Click or drag to resize

Logger Class

Provides a set of methods and properties for logging.
Inheritance Hierarchy
SystemObject
  Sfs2X.WebSocketSharpLogger

Namespace:  Sfs2X.WebSocketSharp
Assembly:  SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax
C#
public class Logger

The Logger type exposes the following members.

Constructors
  NameDescription
Public methodLogger
Initializes a new instance of the Logger class.
Public methodLogger(LogLevel)
Initializes a new instance of the Logger class with the specified logging level.
Public methodLogger(LogLevel, String, ActionLogData, String)
Initializes a new instance of the Logger class with the specified logging level, path to the log file, and output action.
Top
Properties
  NameDescription
Public propertyFile
Gets or sets the current path to the log file.
Public propertyLevel
Gets or sets the current logging level.
Public propertyOutput
Gets or sets the current output action used to output a log.
Top
Methods
  NameDescription
Public methodDebug
Outputs message as a log with Debug.
Public methodError
Outputs message as a log with Error.
Public methodFatal
Outputs message as a log with Fatal.
Public methodInfo
Outputs message as a log with Info.
Public methodTrace
Outputs message as a log with Trace.
Public methodWarn
Outputs message as a log with Warn.
Top
Remarks

If you output a log with lower than the value of the Level property, it cannot be outputted.

The default output action writes a log to the standard output stream and the log file if the File property has a valid path to it.

If you would like to use the custom output action, you should set the Output property to any Action<LogData, string> delegate.

See Also