Fields
HideSensitiveInformationFromLog
#Gets or sets whether personal information (such as UserName or MachineName ought to be included in the log. This flag must be set SUUUPER early on because the first thing the Logger does it dump a bunch of system info into the current log stream. At present, this value is not assigned at all, given that https://www.mcneel.com/privacy allows us to write all this data. The problem arises only when the user decides to share the log files, at which point it will be much harder to remove any specific entry.
Properties
Methods
Add
#Log an exception message.
Add
#Log a message. This method is threadsafe.
DeleteOldLogFiles
#Delete all log files older than the retirement age.
Parameters:
| retirementAge (TimeSpan) | Age at which a log file is considered ripe for deletion. |
Returns: Number of log files deleted.
Diagnostics
#Read all parseable entries from an existing log file.
Parameters:
| bytes (byte[]) | Log byte array. |
Returns: Array of entries.
Diagnostics
#Read all parseable entries from an existing log file.
Parameters:
| logFile (string) | Log file. |
Returns: Array of entries.
DumpDiagnosticsToFile
#Write a set of diagnostic messages to an HTML file. This method will not throw.
Parameters:
| file (string) | File path. |
| entries (IEnumerable<Entry>) | Entries to include. |
Returns: True if file was written or updated, false if otherwise.
LogCurrentState
#public static void LogCurrentState()
Write a bunch of information to the log describing the current state of the computer.
MeasureSpan
#Begin a new timespan measure. You *must* dispose this metric in order to include the measures interval in the log.
Parameters:
| name (string) | Name of metric. |
Returns: Dispoable object for timespan measurement.
MeasureSpan
#Begin a new timespan measure. You *must* dispose this metric in order to include the measures interval in the log.
ShowDiagnosticsInBrowser
#Show the provided logged entries in a window, and save them as an HTML file on the desktop, or in the temp folder if the desktop cannot be written to.
Parameters:
| entries (IEnumerable<Entry>) | Entries to include. |
Returns: The path to the html file if it could be saved, otherwise null. The window is shown regardless.