Click or drag to resize
Ab4d.SharpEngine logo

Log Class

Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.UtilitiesLog

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public static class Log

The Log type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberDebug Static ConditionalLogger that is used to log Debug log messages - always null in this build.
Public propertyStatic memberDebuggerBreakLogLevel 
Public propertyStatic memberError Static ConditionalLogger that is used to log Error log messages.
Public propertyStatic memberFatal Static ConditionalLogger that is used to log Fatal log messages.
Public propertyStatic memberInfo Static ConditionalLogger that is used to log Info log messages - always null in this build.
Public propertyStatic memberIsDebug True when Debug or higher LogLevel is enabled - always false in this build.
Public propertyStatic memberIsEnabled True when any logger is enabled and CurrentLogLevel is more than None.
Public propertyStatic memberIsError True when Error or higher LogLevel is enabled.
Public propertyStatic memberIsFatal True when Fatal or higher LogLevel is enabled.
Public propertyStatic memberIsInfo True when Info or higher LogLevel is enabled - always false in this build.
Public propertyStatic memberIsLoggingToDebugOutput Gets or sets a Boolean that specifies if log messages are written to debug output (for example Visual Studio Output window).
Public propertyStatic memberIsTrace True when Trace or higher LogLevel is enabled - always false in this build.
Public propertyStatic memberIsWarn True when Warn or higher LogLevel is enabled.
Public propertyStatic memberLicense Static ConditionalLogger that is used to log License log messages - always null in this build.
Public propertyStatic memberLogAreaFilter LogAreaFilter can be set to a string that acts as a LogArea filter and writes only log messages from the specified LogArea. This text can also end with '*' char that is then used as wildcard and will filter all LogAreas that starts with the text before the '*' char. The filter needs to include the namespace and type name, for example "Ab4d.SharpEngine.SceneView" or "Ab4d.SharpEngine.Effects.*"
Public propertyStatic memberLogFileName 
Public propertyStatic memberLogLevel Gets or sets the current log level.
Public propertyStatic memberTrace Static ConditionalLogger that is used to log Trace log messages - always null in this build.
Public propertyStatic memberWarn Static ConditionalLogger that is used to log Warn log messages.
Public propertyStatic memberWriteProcessPrivateMemorySize When true, then the process's private memory size is written to log. Also, difference in size from the previous log call is written. Writing memory size can significantly slow down logging. Default value is false.
Public propertyStatic memberWriteSimplifiedLogMessage When true, then only log message with object id (in square brackets) is written to log. When false (by default), then the full log message in the following format is written: "frame number|time|log level|object id|log area|thread id|message|exception info|"
Top
Methods
 NameDescription
Public methodStatic memberAddLogListener(ActionLogLevels, String) Adds an Action that takes LogLevels and a log message (as string) as parameters and is called on each written log message with level bigger then LogLevel.
Public methodStatic memberAddLogListener(ActionLogLevels, String, Int64, String) Adds an Action that takes LogLevels, LogArea (nullable string) and ObjectId (long) and a log message (string) as parameters and is called on each written log message with level bigger then LogLevel.
Public methodStatic memberIsLogLevelEnabled Returns true when the specified log level is enabled.
Public Extension MethodLogAndCheckResult Log with Trace level the name of the called Vulkan method and its result and in case when result is not Success throws a new VulkanException with result code and method name.
Public Extension MethodLogInfoAndCheckResult Log with Info level the name of the called Vulkan method and its result and in case when result is not Success throws a new VulkanException with result code and method name.
Public Extension MethodLogInfoResult Log with Trace level the name of the called Vulkan method and its result.
Public Extension MethodLogResult Log with Trace level the name of the called Vulkan method and its result.
Public Extension MethodLogResultOnError When result is not Success then logs with Trace level the method name and its result and in case when result is not Success throws a new VulkanException with result code and method name.
Public methodStatic memberLogSingleFrame LogSingleFrame method will log only the frame with the specified frameNumber and with the specified log level.
Public methodStatic memberRemoveAllLogListeners Removes all registered log listeners that were added by AddLogListener method.
Public methodStatic memberRemoveLogListener(ActionLogLevels, String) Removes a log action that was added by AddLogListener(ActionLogLevels, String) method.
Public methodStatic memberRemoveLogListener(ActionLogLevels, String, Int64, String) Removes a log action that was added by AddLogListener(ActionLogLevels, String, Int64, String) method.
Public methodStatic memberResetTime 
Public methodStatic memberSetFrameNumber 
Public methodStatic memberWriteLog 
Top
Fields
 NameDescription
Public fieldStatic memberIsLoggingVulkanExtensionNames IsLoggingVulkanExtensionNames specifies if the debug message callback will log all available extension. When displaying log messages to Visual Studio Output this may take a long time and delay startup of the application. Default value is false.
Public fieldStatic memberLastErrorMessage Gets the last error message (the last message that was logged with Error LogLevel. User can set this string to null before some complex operation and then read it for more information.
Public fieldStatic memberLastVulkanValidationMessage Gets the last Vulkan validation warning or error text (if exist; otherwise null)
Public fieldStatic memberMinUsedLogLevel Gets the minimum log level that is used by this build. Usually this is set to Warn for release build (log event with lower level are not compiled into the assembly) and Trace for Debug build.
Public fieldStatic memberWriteProcessTimeInTotalMilliseconds When true then the process time in log file is written as one float value that represents the total elapsed milliseconds. When false, then the process time is written as HH:mm:ss.ffffff. Default value is true;
Top
See Also