CryEngine.Log

Static wrapper around ILog (gEnv->pLog) More...

Static Public Member Functions

static void Info (string msg)
Log an info message to the console and log. More...
static void Info (string format, params object[] args)
Log a formatted info message to the console and log. For more information on formatting refer to string.Format(string, object[]). More...
static void Info< T > (string msg)
Log an info message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My info message. More...
static void Info< T > (string format, params object[] args)
Log a formatted info message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My info message. For more information on formatting refer to string.Format(string, object[]). More...
static void Always (string msg)
Log a message to the console and log that is always printed. More...
static void Always (string format, params object[] args)
Log a formatted message to the console and log that is always printed. For more information on formatting refer to string.Format(string, object[]). More...
static void Always< T > (string msg)
Log a message to the console and log that is always printed, and prefix it with the type name. Example: [Mono] [Log] My message. More...
static void Always< T > (string format, params object[] args)
Log a formatted message to the console and log that is always printed, and prefix it with the type name. Example: [Mono] [Log] My message. For more information on formatting refer to string.Format(string, object[]). More...
static void Warning (string msg)
Log a warning message to the console and log. More...
static void Warning (string format, params object[] args)
Log a formatted warning message to the console and log. For more information on formatting refer to string.Format(string, object[]). More...
static void Warning< T > (string msg)
Log a warning message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My warning message. More...
static void Warning< T > (string format, params object[] args)
Log a formatted warning message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My warning message. For more information on formatting refer to string.Format(string, object[]). More...
static void Error (string msg)
Log an error message to the console and log. More...
static void Error (string format, params object[] args)
Log a formatted error message to the console and log. For more information on formatting refer to string.Format(string, object[]). More...
static void Error< T > (string msg)
Log an error message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My error message. More...
static void Error< T > (string format, params object[] args)
Log a formatted error message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My error message. For more information on formatting refer to string.Format(string, object[]). More...
static void ToConsole (string msg)
Log a message only to the console. More...
static void ToConsole (string format, params object[] args)
Log a formatted message only to the console. For more information on formatting refer to string.Format(string, object[]). More...
static void ToConsole< T > (string msg)
Log a message only to the console and prefix it with the name of the type. Example: [Mono] [Log] My console message. More...
static void ToConsole< T > (string format, params object[] args)
Log a formatted message only to the console and prefix it with the name of the type. Example: [Mono] [Log] My console message. For more information on formatting refer to string.Format(string, object[]). More...
static void ToFile (string msg)
Log a message only to the log file. More...
static void ToFile (string format, params object[] args)
Log a formatted message only to the log file. For more information on formatting refer to string.Format(string, object[]). More...
static void ToFile< T > (string msg)
Log a message only to the log file and prefix it with the name of the type. Example: [Mono] [Log] My log file message. More...
static void ToFile< T > (string format, params object[] args)
Log a formatted message only to the log file and prefix it with the name of the type. Example: [Mono] [Log] My log file message. For more information on formatting refer to string.Format(string, object[]). More...
static void Exception (Exception ex)
Log an exception to the console and log. More...
static void Exception (Exception ex, string format, params object[] args)
Log an exception to the console and log with a formatted custom error message. For more information on formatting refer to string.Format(string, object[]). More...
static void Exception (Exception ex, string customError)
Log an exception to the console and log with a custom error message. More...
static void Exception< T > (Exception ex)
Log an exception to the console and log and prefix it with the name of the type. More...
static void Exception< T > (Exception ex, string format, params object[] args)
Log an exception to the console and log with a formatted custom error message and prefix it with the name of the type. For more information on formatting refer to string.Format(string, object[]). More...
static void Exception< T > (Exception ex, string customError=null)
Log an exception to the console and log with a custom error message and prefix it with the name of the type. For more information on formatting refer to string.Format(string, object[]). More...
static void StackTrace ()
Log current stack trace More...

Properties

static string FileName [get, set]
The path of the file where the log is saved to. More...
static bool BreakOnException [get, set]
If true, the debugger will break when an exception is thrown. More...

Detailed Description

Static wrapper around ILog (gEnv->pLog)

Member Function Documentation

◆ Always() [1/2]

static void CryEngine.Log.Always ( string msg)
inline
static

Log a message to the console and log that is always printed.

Parameters
msg

◆ Always() [2/2]

static void CryEngine.Log.Always ( string format,
params object [] args
)
inline
static

Log a formatted message to the console and log that is always printed. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ Always< T >() [1/2]

static void CryEngine.Log.Always< T > ( string msg)
inline
static

Log a message to the console and log that is always printed, and prefix it with the type name. Example: [Mono] [Log] My message.

Template Parameters
T
Parameters
msg

◆ Always< T >() [2/2]

static void CryEngine.Log.Always< T > ( string format,
params object [] args
)
inline
static

Log a formatted message to the console and log that is always printed, and prefix it with the type name. Example: [Mono] [Log] My message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

◆ Error() [1/2]

static void CryEngine.Log.Error ( string msg)
inline
static

Log an error message to the console and log.

Parameters
msg

◆ Error() [2/2]

static void CryEngine.Log.Error ( string format,
params object [] args
)
inline
static

Log a formatted error message to the console and log. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ Error< T >() [1/2]

static void CryEngine.Log.Error< T > ( string msg)
inline
static

Log an error message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My error message.

Template Parameters
T
Parameters
msg

◆ Error< T >() [2/2]

static void CryEngine.Log.Error< T > ( string format,
params object [] args
)
inline
static

Log a formatted error message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My error message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

◆ Exception() [1/3]

static void CryEngine.Log.Exception ( Exception ex)
inline
static

Log an exception to the console and log.

Parameters
ex

◆ Exception() [2/3]

static void CryEngine.Log.Exception ( Exception ex,
string format,
params object [] args
)
inline
static

Log an exception to the console and log with a formatted custom error message. For more information on formatting refer to string.Format(string, object[]).

Parameters
ex
format
args

◆ Exception() [3/3]

static void CryEngine.Log.Exception ( Exception ex,
string customError
)
inline
static

Log an exception to the console and log with a custom error message.

Parameters
ex
customError

◆ Exception< T >() [1/3]

static void CryEngine.Log.Exception< T > ( Exception ex)
inline
static

Log an exception to the console and log and prefix it with the name of the type.

Template Parameters
T
Parameters
ex

◆ Exception< T >() [2/3]

static void CryEngine.Log.Exception< T > ( Exception ex,
string format,
params object [] args
)
inline
static

Log an exception to the console and log with a formatted custom error message and prefix it with the name of the type. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
ex
format
args

◆ Exception< T >() [3/3]

static void CryEngine.Log.Exception< T > ( Exception ex,
string customError = null
)
inline
static

Log an exception to the console and log with a custom error message and prefix it with the name of the type. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
ex
customError

◆ Info() [1/2]

static void CryEngine.Log.Info ( string msg)
inline
static

Log an info message to the console and log.

Parameters
msg

◆ Info() [2/2]

static void CryEngine.Log.Info ( string format,
params object [] args
)
inline
static

Log a formatted info message to the console and log. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ Info< T >() [1/2]

static void CryEngine.Log.Info< T > ( string msg)
inline
static

Log an info message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My info message.

Template Parameters
T
Parameters
msg

◆ Info< T >() [2/2]

static void CryEngine.Log.Info< T > ( string format,
params object [] args
)
inline
static

Log a formatted info message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My info message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

◆ StackTrace()

static void CryEngine.Log.StackTrace ( )
inline
static

Log current stack trace

◆ ToConsole() [1/2]

static void CryEngine.Log.ToConsole ( string msg)
inline
static

Log a message only to the console.

Parameters
msg

◆ ToConsole() [2/2]

static void CryEngine.Log.ToConsole ( string format,
params object [] args
)
inline
static

Log a formatted message only to the console. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ ToConsole< T >() [1/2]

static void CryEngine.Log.ToConsole< T > ( string msg)
inline
static

Log a message only to the console and prefix it with the name of the type. Example: [Mono] [Log] My console message.

Template Parameters
T
Parameters
msg

◆ ToConsole< T >() [2/2]

static void CryEngine.Log.ToConsole< T > ( string format,
params object [] args
)
inline
static

Log a formatted message only to the console and prefix it with the name of the type. Example: [Mono] [Log] My console message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

◆ ToFile() [1/2]

static void CryEngine.Log.ToFile ( string msg)
inline
static

Log a message only to the log file.

Parameters
msg

◆ ToFile() [2/2]

static void CryEngine.Log.ToFile ( string format,
params object [] args
)
inline
static

Log a formatted message only to the log file. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ ToFile< T >() [1/2]

static void CryEngine.Log.ToFile< T > ( string msg)
inline
static

Log a message only to the log file and prefix it with the name of the type. Example: [Mono] [Log] My log file message.

Template Parameters
T
Parameters
msg

◆ ToFile< T >() [2/2]

static void CryEngine.Log.ToFile< T > ( string format,
params object [] args
)
inline
static

Log a formatted message only to the log file and prefix it with the name of the type. Example: [Mono] [Log] My log file message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

◆ Warning() [1/2]

static void CryEngine.Log.Warning ( string msg)
inline
static

Log a warning message to the console and log.

Parameters
msg

◆ Warning() [2/2]

static void CryEngine.Log.Warning ( string format,
params object [] args
)
inline
static

Log a formatted warning message to the console and log. For more information on formatting refer to string.Format(string, object[]).

Parameters
format
args

◆ Warning< T >() [1/2]

static void CryEngine.Log.Warning< T > ( string msg)
inline
static

Log a warning message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My warning message.

Template Parameters
T
Parameters
msg

◆ Warning< T >() [2/2]

static void CryEngine.Log.Warning< T > ( string format,
params object [] args
)
inline
static

Log a formatted warning message to the console and log, and prefix it with the type name. Example: [Mono] [Log] My warning message. For more information on formatting refer to string.Format(string, object[]).

Template Parameters
T
Parameters
format
args

Property Documentation

◆ BreakOnException

bool CryEngine.Log.BreakOnException
static
get
set

If true, the debugger will break when an exception is thrown.

◆ FileName

string CryEngine.Log.FileName
static
get
set

The path of the file where the log is saved to.