Class LogEvent
Object that holds the information associated to a single log
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public class LogEvent
Constructors
LogEvent()
Initializes and returns a LogEvent.
Declaration
public LogEvent()
LogEvent(String, LogLevel, Exception, Dictionary<String, Object>)
Initializes and returns a LogEvent.
Declaration
public LogEvent(string loggerName, LogLevel level, Exception exception, Dictionary<string, object> properties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | loggerName | The logger's name. |
| LogLevel | level | The log level. |
| Exception | exception | The exception to log. |
| Dictionary<String, Object> | properties | The properties to log. |
LogEvent(String, LogLevel, Exception, String, Dictionary<String, Object>)
Initializes and returns a LogEvent.
Declaration
public LogEvent(string loggerName, LogLevel level, Exception exception, string message, Dictionary<string, object> properties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | loggerName | The logger's name. |
| LogLevel | level | The log level. |
| Exception | exception | The exception to log. |
| String | message | The log message. |
| Dictionary<String, Object> | properties | The properties to log. |
LogEvent(String, LogLevel, Exception, String, Object[], Dictionary<String, Object>)
Initializes and returns a LogEvent.
Declaration
public LogEvent(string loggerName, LogLevel level, Exception exception, string message, object[] messageArgs, Dictionary<string, object> properties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | loggerName | The logger's name. |
| LogLevel | level | The log level. |
| Exception | exception | The exception to log. |
| String | message | The log message. |
| Object[] | messageArgs | The log message arguments. |
| Dictionary<String, Object> | properties | The properties to log. |
LogEvent(String, LogLevel, String, Dictionary<String, Object>)
Initializes and returns a LogEvent.
Declaration
public LogEvent(string loggerName, LogLevel level, string message, Dictionary<string, object> properties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | loggerName | The logger's name. |
| LogLevel | level | The log level. |
| String | message | The log message. |
| Dictionary<String, Object> | properties | The properties to log. |
LogEvent(String, LogLevel, String, Object[], Dictionary<String, Object>)
Initializes and returns a LogEvent.
Declaration
public LogEvent(string loggerName, LogLevel level, string message, object[] messageArgs, Dictionary<string, object> properties = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | loggerName | The logger's name. |
| LogLevel | level | The log level. |
| String | message | The log message. |
| Object[] | messageArgs | The log message arguments. |
| Dictionary<String, Object> | properties | The properties to log. |
Properties
Exception
The exception to log.
Declaration
public Exception Exception { get; set; }
Property Value
| Type | Description |
|---|---|
| Exception |
Level
The LogLevel.
Declaration
public LogLevel Level { get; set; }
Property Value
| Type | Description |
|---|---|
| LogLevel |
LoggerName
The logger's name.
Declaration
public string LoggerName { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
Message
The log message.
Declaration
public string Message { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
MessageArgs
The log message args.
Declaration
public object[] MessageArgs { get; set; }
Property Value
| Type | Description |
|---|---|
| Object[] |
Properties
The properties to log.
Declaration
public Dictionary<string, object> Properties { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<String, Object> |
Timestamp
The timestamp for the log.
Declaration
public DateTime Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |