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
10 Ways To Make Your Airbnb Listing Stand Out - AirHost Academy
The New Frontier Investors - by Jagdeep Singh Bachher & Adam D Dixon & Ashby H B Monk (Hardcover)
Ffxiv Act Plugin
Inducement Small Bribe
Live Basketball Scores Flashscore
Monthly Forecast Accuweather
Identifont Upload
Txtvrfy Sheridan Wy
Dr Klabzuba Okc
Buckaroo Blog
True Statement About A Crown Dependency Crossword
Premier Boating Center Conroe
Globe Position Fault Litter Robot
What’s the Difference Between Cash Flow and Profit?
Driving Directions To Atlanta
7440 Dean Martin Dr Suite 204 Directions
charleston cars & trucks - by owner - craigslist
7 Fly Traps For Effective Pest Control
DoorDash, Inc. (DASH) Stock Price, Quote & News - Stock Analysis
Craigslist Panama City Fl
Tygodnik Polityka - Polityka.pl
Odfl4Us Driver Login
Craigslist Sparta Nj
Site : Storagealamogordo.com Easy Call
Lista trofeów | Jedi Upadły Zakon / Fallen Order - Star Wars Jedi Fallen Order - poradnik do gry | GRYOnline.pl
Reborn Rich Kissasian
Walgreens Bunce Rd
Accuweather Minneapolis Radar
Bay Area Craigslist Cars For Sale By Owner
Umn Biology
Lcsc Skyward
Meggen Nut
Bj's Tires Near Me
Gus Floribama Shore Drugs
Hotel Denizen Mckinney
Xfinity Outage Map Lacey Wa
Los Amigos Taquería Kalona Menu
Sun Haven Pufferfish
Bee And Willow Bar Cart
Hell's Kitchen Valley Center Photos Menu
Lyca Shop Near Me
Spectrum Outage in Genoa City, Wisconsin
How Does The Common App Work? A Guide To The Common App
Go Bananas Wareham Ma
Rocky Bfb Asset
Walmart 24 Hrs Pharmacy
Borat: An Iconic Character Who Became More than Just a Film
Headlining Hip Hopper Crossword Clue
40X100 Barndominium Floor Plans With Shop
Lightfoot 247
Vcuapi
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.