Class Logger
Initializes a new instance of the Logger.
Inheritance
Inherited Members
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[HideInEditor]
public class Logger : ILogger
Constructors
Logger(ILogHandler)
Create a custom Logger.
Declaration
public Logger(ILogHandler logHandler)
Parameters
ILogHandler
logHandler
Pass in default log handler or custom log handler. |
Properties
FilterLogType
To selective enable debug log message.
Declaration
public LogType FilterLogType { get; set; }
Property Value
LogType
|
Implements
LogEnabled
To runtime toggle debug logging [ON/OFF].
Declaration
public bool LogEnabled { get; set; }
Property Value
System.Boolean
|
Implements
LogHandler
Set Logger.ILogHandler.
Declaration
public ILogHandler LogHandler { get; set; }
Property Value
ILogHandler
|
Implements
Methods
IsLogTypeAllowed(LogType)
Check logging is enabled based on the LogType.
Declaration
public bool IsLogTypeAllowed(LogType logType)
Parameters
LogType
logType
The type of the log message. |
Returns
System.Boolean
Returns true in case logs of LogType will be logged otherwise returns false. |
Implements
Log(LogType, Object, String)
Logs a formatted message.
Declaration
public void Log(LogType logType, Object context, string message)
Parameters
LogType
logType
The type of the log message. |
Object
context
Object to which the message applies. |
System.String
message
Message to log. |
Implements
Log(LogType, Object, String, Object[])
Logs a formatted message.
Declaration
public void Log(LogType logType, Object context, string format, params object[] args)
Parameters
LogType
logType
The type of the log message. |
Object
context
Object to which the message applies. |
System.String
format
A composite format string. |
System.Object[]
args
Format arguments. |
Log(LogType, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(LogType logType, object message)
Parameters
LogType
logType
The type of the log message. |
System.Object
message
String or object to be converted to string representation for display. |
Implements
Log(LogType, Object, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(LogType logType, object message, Object context)
Parameters
LogType
logType
The type of the log message. |
System.Object
message
String or object to be converted to string representation for display. |
Object
context
Object to which the message applies. |
Implements
Log(LogType, String, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(LogType logType, string tag, object message)
Parameters
LogType
logType
The type of the log message. |
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Implements
Log(LogType, String, Object, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(LogType logType, string tag, object message, Object context)
Parameters
LogType
logType
The type of the log message. |
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Object
context
Object to which the message applies. |
Implements
Log(LogType, String, Object[])
Logs a formatted message.
Declaration
public void Log(LogType logType, string format, params object[] args)
Parameters
LogType
logType
The type of the log message. |
System.String
format
A composite format string. |
System.Object[]
args
Format arguments. |
Log(Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(object message)
Parameters
System.Object
message
String or object to be converted to string representation for display. |
Implements
Log(String, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(string tag, object message)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Implements
Log(String, Object, Object)
Logs message to the Flax Console using default logger.
Declaration
public void Log(string tag, object message, Object context)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Object
context
Object to which the message applies. |
Implements
LogError(String, Object)
A variant of Logger.Info that logs an error message.
Declaration
public void LogError(string tag, object message)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Implements
LogError(String, Object, Object)
A variant of Logger.Info that logs an error message.
Declaration
public void LogError(string tag, object message, Object context)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Object
context
Object to which the message applies. |
Implements
LogException(Exception)
A variant of Logger.Info that logs an exception message.
Declaration
public void LogException(Exception exception)
Parameters
System.Exception
exception
Runtime Exception. |
Implements
LogException(Exception, Object)
A variant of Logger.Info that logs an exception message.
Declaration
public void LogException(Exception exception, Object context)
Parameters
System.Exception
exception
Runtime Exception. |
Object
context
Object to which the message applies. |
Implements
LogFormat(LogType, String, Object[])
Logs a formatted message.
Declaration
public void LogFormat(LogType logType, string format, params object[] args)
Parameters
LogType
logType
|
System.String
format
|
System.Object[]
args
|
Implements
LogWarning(String, Object)
A variant of Logger.Info that logs an warning message.
Declaration
public void LogWarning(string tag, object message)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Implements
LogWarning(String, Object, Object)
A variant of Logger.Info that logs an warning message.
Declaration
public void LogWarning(string tag, object message, Object context)
Parameters
System.String
tag
Used to identify the source of a log message. It usually identifies the class where the log call occurs. |
System.Object
message
String or object to be converted to string representation for display. |
Object
context
Object to which the message applies. |