C# Class Lawo.EmberPlusSharp.S101.S101Logger

Represents a logger that logs message payloads according to the types passed to the constructor.
Inheritance: IS101Logger
显示文件 Open project: Lawo/ember-plus-sharp Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Releases all resources used by the current instance of the S101Logger class.

LogData ( string type, string direction, byte buffer, int index, int count ) : EventInfo
LogEvent ( string eventName ) : EventInfo
LogEvent ( string eventName, string data ) : EventInfo
LogException ( string direction, Exception exception ) : EventInfo
LogMessage ( string direction, S101Message message, byte payload ) : EventInfo
S101Logger ( EmberTypeBag types, TextWriter logWriter ) : System

Initializes a new instance of the S101Logger class by calling S101Logger( types, logWriter, new XmlWriterSettings { Indent = true }).

S101Logger ( EmberTypeBag types, TextWriter logWriter, XmlWriterSettings settings ) : System

Initializes a new instance of the S101Logger class.

S101Logger ( EmberTypeBag types, XmlWriter xmlLogWriter ) : System

Initializes a new instance of the S101Logger class.

S101Logger ( IEmberConverter converter, XmlWriter xmlLogWriter ) : System

Initializes a new instance of the S101Logger class.

Private Methods

Method Description
LogMessage ( System.DateTime timeUtc, string direction, S101Message message, byte payload ) : EventInfo
ValidateLogWriter ( TextWriter logWriter ) : TextWriter
WriteEndEvent ( ) : void
WriteStartEvent ( string type ) : System.DateTime
WriteStartEvent ( string type, System.DateTime timeUtc ) : void

Method Details

Dispose() public method

Releases all resources used by the current instance of the S101Logger class.
public Dispose ( ) : void
return void

LogData() public method

public LogData ( string type, string direction, byte buffer, int index, int count ) : EventInfo
type string
direction string
buffer byte
index int
count int
return EventInfo

LogEvent() public method

public LogEvent ( string eventName ) : EventInfo
eventName string
return EventInfo

LogEvent() public method

public LogEvent ( string eventName, string data ) : EventInfo
eventName string
data string
return EventInfo

LogException() public method

public LogException ( string direction, Exception exception ) : EventInfo
direction string
exception System.Exception
return EventInfo

LogMessage() public method

public LogMessage ( string direction, S101Message message, byte payload ) : EventInfo
direction string
message S101Message
payload byte
return EventInfo

S101Logger() public method

Initializes a new instance of the S101Logger class by calling S101Logger( types, logWriter, new XmlWriterSettings { Indent = true }).
public S101Logger ( EmberTypeBag types, TextWriter logWriter ) : System
types EmberTypeBag
logWriter System.IO.TextWriter
return System

S101Logger() public method

Initializes a new instance of the S101Logger class.
, and/or /// equal null.
public S101Logger ( EmberTypeBag types, TextWriter logWriter, XmlWriterSettings settings ) : System
types EmberTypeBag The types to pass to the internal , which is used to convert /// the payload to XML.
logWriter System.IO.TextWriter The to write log messages to, will be passed to /// .
settings System.Xml.XmlWriterSettings The settings to create the internal with, will be passed to /// .
return System

S101Logger() public method

Initializes a new instance of the S101Logger class.
and/or /// equal null.
public S101Logger ( EmberTypeBag types, XmlWriter xmlLogWriter ) : System
types EmberTypeBag The types to pass to the internal , which is used to convert /// the payload to XML.
xmlLogWriter System.Xml.XmlWriter The to write log messages to.
return System

S101Logger() public method

Initializes a new instance of the S101Logger class.
and/or /// equal null.
public S101Logger ( IEmberConverter converter, XmlWriter xmlLogWriter ) : System
converter IEmberConverter The converter to use to convert the payload to XML.
xmlLogWriter System.Xml.XmlWriter The to write log messages to.
return System