 |
Log Class |
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
SyntaxThe Log type exposes the following members.
Properties | Name | Description |
---|
  | Debug |
Static ConditionalLogger that is used to log Debug log messages - always null in this build.
|
  | DebuggerBreakLogLevel | |
  | Error |
Static ConditionalLogger that is used to log Error log messages.
|
  | Fatal |
Static ConditionalLogger that is used to log Fatal log messages.
|
  | Info |
Static ConditionalLogger that is used to log Info log messages - always null in this build.
|
  | IsDebug |
True when Debug or higher LogLevel is enabled - always false in this build.
|
  | IsEnabled |
True when any logger is enabled and CurrentLogLevel is more than None.
|
  | IsError |
True when Error or higher LogLevel is enabled.
|
  | IsFatal |
True when Fatal or higher LogLevel is enabled.
|
  | IsInfo |
True when Info or higher LogLevel is enabled - always false in this build.
|
  | IsLoggingToDebugOutput |
Gets or sets a Boolean that specifies if log messages are written to debug output (for example Visual Studio Output window).
|
  | IsTrace |
True when Trace or higher LogLevel is enabled - always false in this build.
|
  | IsWarn |
True when Warn or higher LogLevel is enabled.
|
  | License |
Static ConditionalLogger that is used to log License log messages - always null in this build.
|
  | LogAreaFilter |
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.*"
|
  | LogFileName | |
  | LogLevel |
Gets or sets the current log level.
|
  | Trace |
Static ConditionalLogger that is used to log Trace log messages - always null in this build.
|
  | Warn |
Static ConditionalLogger that is used to log Warn log messages.
|
  | WriteProcessPrivateMemorySize |
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.
|
  | WriteSimplifiedLogMessage |
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 | Name | Description |
---|
  | AddLogListener(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.
|
  | AddLogListener(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.
|
  | IsLogLevelEnabled |
Returns true when the specified log level is enabled.
|
 | LogAndCheckResult |
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.
|
 | LogInfoAndCheckResult |
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.
|
 | LogInfoResult |
Log with Trace level the name of the called Vulkan method and its result.
|
 | LogResult |
Log with Trace level the name of the called Vulkan method and its result.
|
 | LogResultOnError |
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.
|
  | LogSingleFrame |
LogSingleFrame method will log only the frame with the specified frameNumber and with the specified log level.
|
  | RemoveAllLogListeners |
Removes all registered log listeners that were added by AddLogListener method.
|
  | RemoveLogListener(ActionLogLevels, String) |
Removes a log action that was added by AddLogListener(ActionLogLevels, String) method.
|
  | RemoveLogListener(ActionLogLevels, String, Int64, String) |
Removes a log action that was added by AddLogListener(ActionLogLevels, String, Int64, String) method.
|
  | ResetTime | |
  | SetFrameNumber | |
  | WriteLog | |
Top
Fields | Name | Description |
---|
  | IsLoggingVulkanExtensionNames |
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.
|
  | LastErrorMessage |
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.
|
  | LastVulkanValidationMessage |
Gets the last Vulkan validation warning or error text (if exist; otherwise null)
|
  | MinUsedLogLevel |
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.
|
  | WriteProcessTimeInTotalMilliseconds |
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