SkyWay Unity SDK
公式APIリファレンス
読み取り中…
検索中…
一致する文字列を見つけられません
WebSocketSharp.Logger クラス

Provides a set of methods and properties for logging. [詳解]

公開メンバ関数

 Logger ()
 Initializes a new instance of the Logger class.
 
 Logger (LogLevel level)
 Initializes a new instance of the Logger class with the specified logging level.
 
 Logger (LogLevel level, string file, Action< LogData, string > output)
 Initializes a new instance of the Logger class with the specified logging level, path to the log file, and delegate used to output a log.
 
void Debug (string message)
 Outputs the specified message as a log with the Debug level.
 
void Error (string message)
 Outputs the specified message as a log with the Error level.
 
void Fatal (string message)
 Outputs the specified message as a log with the Fatal level.
 
void Info (string message)
 Outputs the specified message as a log with the Info level.
 
void Trace (string message)
 Outputs the specified message as a log with the Trace level.
 
void Warn (string message)
 Outputs the specified message as a log with the Warn level.
 

プロパティ

string File [get, set]
 Gets or sets the path to the log file.
 
LogLevel Level [get, set]
 Gets or sets the current logging level.
 
Action< LogData, string > Output [get, set]
 Gets or sets the delegate used to output a log.
 

詳解

Provides a set of methods and properties for logging.

If you output a log with lower than the current logging level, it cannot be outputted.

The default output method writes a log to the standard output stream and the text file if it has a valid path.

If you would like to use the custom output method, you should specify it with the constructor or the Logger.Output property.

構築子と解体子

◆ Logger() [1/3]

WebSocketSharp.Logger.Logger ( )
inline

Initializes a new instance of the Logger class.

This constructor initializes the logging level with the Error level.

◆ Logger() [2/3]

WebSocketSharp.Logger.Logger ( LogLevel level)
inline

Initializes a new instance of the Logger class with the specified logging level.

引数
levelOne of the LogLevel enum values that specifies the logging level.

◆ Logger() [3/3]

WebSocketSharp.Logger.Logger ( LogLevel level,
string file,
Action< LogData, string > output )
inline

Initializes a new instance of the Logger class with the specified logging level, path to the log file, and delegate used to output a log.

引数
levelOne of the LogLevel enum values that specifies the logging level.
fileA string that specifies the path to the log file.
outputAn T:System.Action<LogData, string> that specifies the delegate used to output a log.

関数詳解

◆ Debug()

void WebSocketSharp.Logger.Debug ( string message)
inline

Outputs the specified message as a log with the Debug level.

If the current logging level is higher than the Debug level, this method does not output the message as a log.

引数
messageA string that specifies the message to output.

◆ Error()

void WebSocketSharp.Logger.Error ( string message)
inline

Outputs the specified message as a log with the Error level.

If the current logging level is higher than the Error level, this method does not output the message as a log.

引数
messageA string that specifies the message to output.

◆ Fatal()

void WebSocketSharp.Logger.Fatal ( string message)
inline

Outputs the specified message as a log with the Fatal level.

引数
messageA string that specifies the message to output.

◆ Info()

void WebSocketSharp.Logger.Info ( string message)
inline

Outputs the specified message as a log with the Info level.

If the current logging level is higher than the Info level, this method does not output the message as a log.

引数
messageA string that specifies the message to output.

◆ Trace()

void WebSocketSharp.Logger.Trace ( string message)
inline

Outputs the specified message as a log with the Trace level.

If the current logging level is higher than the Trace level, this method does not output the message as a log.

引数
messageA string that specifies the message to output.

◆ Warn()

void WebSocketSharp.Logger.Warn ( string message)
inline

Outputs the specified message as a log with the Warn level.

If the current logging level is higher than the Warn level, this method does not output the message as a log.

引数
messageA string that specifies the message to output.

プロパティ詳解

◆ File

string WebSocketSharp.Logger.File
getset

Gets or sets the path to the log file.

A string that represents the path to the log file if any.

◆ Level

LogLevel WebSocketSharp.Logger.Level
getset

Gets or sets the current logging level.

A log with lower than the value of this property cannot be outputted.

One of the LogLevel enum values.

It represents the current logging level.

◆ Output

Action<LogData, string> WebSocketSharp.Logger.Output
getset

Gets or sets the delegate used to output a log.

An T:System.Action<LogData, string> delegate.

It represents the delegate called when the logger outputs a log.

The string parameter passed to the delegate is the value of the Logger.File property.

If the value to set is null, the default output method is set.


このクラス詳解は次のファイルから抽出されました: