C# Class KEngine.Log

KEngine Logger, file write + console output
Datei anzeigen Open project: mr-kelly/KEngine

Public Properties

Property Type Description
IsUnityEditor bool
LogLevel LogLevel

Public Methods

Method Description
AddLogCallback ( LogCallback callback ) : void

第一次使用时注册,之所以不放到静态构造器,因为多线程问题

Debug ( string log ) : void
Error ( string err ) : void
GetLogPath ( ) : string
GetTopStack ( int stack = 2 ) : StackFrame
HasLogFile ( ) : bool
Info ( string log ) : void
LogConsole_MultiThread ( string log ) : void
LogError ( string err ) : void
LogErrorWithStack ( string err = "", int stack = 2 ) : void
LogException ( Exception e ) : void
LogFileCallbackHandler ( string condition, string stacktrace, LogLevel type ) : void
LogToFile ( string szMsg ) : void
LogToFile ( string szMsg, bool append ) : void
LogWarning ( string err ) : void
Logs ( ) : void
RemoveLogCallback ( LogCallback callback ) : void
Trace ( string log ) : void
Warning ( string err ) : void

Private Methods

Method Description
Assert ( System.Int64 result ) : void
Assert ( bool result ) : void
Assert ( int result ) : void
Assert ( object obj ) : void
Check ( object obj, string formatStr = null ) : bool
DoLog ( string szMsg, object args, LogLevel emLevel ) : void
GetUnityLogCallback ( LogCallback callback ) : Application.LogCallback
Log ( ) : UnityEngine
OnLogCallback ( string condition, string stacktrace, LogLevel type ) : void

Method Details

AddLogCallback() public static method

第一次使用时注册,之所以不放到静态构造器,因为多线程问题
public static AddLogCallback ( LogCallback callback ) : void
callback LogCallback
return void

Debug() public static method

public static Debug ( string log ) : void
log string
return void

Error() public static method

public static Error ( string err ) : void
err string
return void

GetLogPath() public static method

public static GetLogPath ( ) : string
return string

GetTopStack() public static method

public static GetTopStack ( int stack = 2 ) : StackFrame
stack int
return StackFrame

HasLogFile() public static method

public static HasLogFile ( ) : bool
return bool

Info() public static method

public static Info ( string log ) : void
log string
return void

LogConsole_MultiThread() public static method

public static LogConsole_MultiThread ( string log ) : void
log string
return void

LogError() public static method

public static LogError ( string err ) : void
err string
return void

LogErrorWithStack() public static method

public static LogErrorWithStack ( string err = "", int stack = 2 ) : void
err string
stack int
return void

LogException() public static method

public static LogException ( Exception e ) : void
e Exception
return void

LogFileCallbackHandler() public static method

public static LogFileCallbackHandler ( string condition, string stacktrace, LogLevel type ) : void
condition string
stacktrace string
type LogLevel
return void

LogToFile() public static method

public static LogToFile ( string szMsg ) : void
szMsg string
return void

LogToFile() public static method

public static LogToFile ( string szMsg, bool append ) : void
szMsg string
append bool
return void

LogWarning() public static method

public static LogWarning ( string err ) : void
err string
return void

Logs() public static method

public static Logs ( ) : void
return void

RemoveLogCallback() public static method

public static RemoveLogCallback ( LogCallback callback ) : void
callback LogCallback
return void

Trace() public static method

public static Trace ( string log ) : void
log string
return void

Warning() public static method

public static Warning ( string err ) : void
err string
return void

Property Details

IsUnityEditor public_oe static_oe property

public static bool IsUnityEditor
return bool

LogLevel public_oe static_oe property

public static LogLevel LogLevel
return LogLevel