Log Sensitivity (2024)

This page contains information that is specific to the log sensitivity, but does not cover the logging framework in general. Ensure that you read the logging page and others in the section thoroughly.

Log sensitivity filters work by allowing developers to pass structured objects into the logging framework, and for the logging framework to decide how to render that content appropriately. Logging sensitivity filters do not attempt to parse log strings to remove information. It is imperative that application developers implement logging as described below for the logging sensitivity filters to correctly work. It is strongly recommended that you test that your log messages are correctly being filtered before deploying any application.

Logs may, by their nature, contain information which may have privacy or commercial sensitivities; imagine situations where a log is being generated about a file that’s being converted to PDF, and the log includes a file named Upcoming Redundancies.docx. The logging framework supports this concept by allowing each log to be allocated a Sensitivity Level. This sensitivity level describes how some information should be logged within the vault.

Each target can have its sensitivity set to one of three levels: Minimum sensitivity (default), Maximum sensitivity, or Custom. If Custom is selected then the user can choose which flags should be passed to the sensitivity filter:

Log Sensitivity (1)

When a log message is written to disk, it is passed through a sensitivity filter. This filter will look at the arguments being rendered into the string, along with the target sensitivity level, and choose how the value should be rendered. Consider this code:

// Use the $"" syntax to create a FormattableString.// Note that we are passing the ObjVerEx instance, not the title!this.Logger?.Trace($"Starting conversion of {env.ObjVerEx} to PDF...");

The resulting log message would depend on the sensitity level: Starting conversion of 'hello world.docx (0-123-1)' (if the sensitivity level allows document titles to be shown) Starting conversion of (0-123-1) (if the sensitivity level does not allow document titles to be shown)

See Also
Mask Logs

Supported logging syntaxes for log sensitivity

The following syntaxes are supported for log sensitivity:

// Using the FormattableString approach.this.Logger?.Trace($"My message {myObjectVersion}");
// Using the string-with-arguments approach.// Note: you must have the following using statement for this to work!// using MFiles.VaultApplications.Logging;this.Logger?.Trace("My message {0}", myObjectVersion);

Unsupported logging syntaxes

These logging syntaxes produce simple strings and will not be filtered. It is advised that you avoid these syntaxes.

// Contatenating strings.this.Logger?.Trace("My message " + myObjectVersion.Title); // DO NOT DO THIS!// Explicitly using string.formatthis.Logger?.Trace(string.format("My message {0}", myObjectVersion)); // DO NOT DO THIS!this.Logger?.Trace(string.format("My message {0}", myObjectVersion.Title)); // DO NOT DO THIS!// Using a formattable string, but passing the title directlythis.Logger?.Trace($"My message {myObjectVersion.Title}"); // DO NOT DO THIS!

Custom log sensitivity filters

The logging library contains built-in sensitivity filters for ObjectVersion, ObjectVersionAndProperties, and PropertyValue. The VAF Extensions library contains a built-in sensitivity filter for ObjVerEx.

To create a custom log sensitivity filter:

  1. Create a class that inherits from MFiles.VaultApplications.Logging.Sensitivity.LogSensitivityFilterBase<TType> (where TType is the type that your filter handles).
  2. The system can only cope with a single filter being registered for any given type. If you are looking to override a built-in sensitivity filter (e.g. to add your own for ObjectVersion), then:
    1. Add the [DoNotAutomaticallyRegister] attribute to your class to stop the system automatically finding and registering it.
    2. After the log manager is initialized, call LogSensitivityFilterFactory.Default.Register, passing an instance of the log sensitivity filter and ensuring that overwriteExistingRegistrations is true.
Log Sensitivity (2024)
Top Articles
Can I claim business expense after date business closed?
Best Rate Guaranteed | Travel Deals
Terrorist Usually Avoid Tourist Locations
Dr Doe's Chemistry Quiz Answer Key
Paketshops | PAKET.net
What is the surrender charge on life insurance?
OpenXR support for IL-2 and DCS for Windows Mixed Reality VR headsets
Nonne's Italian Restaurant And Sports Bar Port Orange Photos
Craigslist Motorcycles Orange County Ca
Pricelinerewardsvisa Com Activate
Nearest Walgreens Or Cvs Near Me
Kaitlyn Katsaros Forum
Unionjobsclearinghouse
Spn 520211
Lakewood Campground Golf Cart Rental
Ezel Detailing
Best Nail Salons Open Near Me
Yonkers Results For Tonight
Kohls Lufkin Tx
Telegram Voyeur
Stickley Furniture
10 Best Quotes From Venom (2018)
Elanco Rebates.com 2022
Ryujinx Firmware 15
Craigslist/Phx
Franklin Villafuerte Osorio
Ofw Pinoy Channel Su
Persona 4 Golden Taotie Fusion Calculator
Strange World Showtimes Near Atlas Cinemas Great Lakes Stadium 16
Solemn Behavior Antonym
Facebook Marketplace Marrero La
Caderno 2 Aulas Medicina - Matemática
Frank 26 Forum
Mcgiftcardmall.con
Sunrise Garden Beach Resort - Select Hurghada günstig buchen | billareisen.at
Oxford House Peoria Il
Pay Entergy Bill
Craigslist Putnam Valley Ny
Rs3 Bis Perks
PruittHealth hiring Certified Nursing Assistant - Third Shift in Augusta, GA | LinkedIn
Gravel Racing
5A Division 1 Playoff Bracket
6576771660
Citymd West 146Th Urgent Care - Nyc Photos
St Vrain Schoology
Stosh's Kolaches Photos
Embry Riddle Prescott Academic Calendar
White County
Funkin' on the Heights
Craigslist Pet Phoenix
Service Changes and Self-Service Options
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 6690

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.