Class UCLogger
Class used to do the actual logging from dev code.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public class UCLogger
Properties
Name
The UCLogger's name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Properties
The UCLogger's tracked properties.
Declaration
public IReadOnlyDictionary<string, object> Properties { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<String, Object> |
Methods
AddOrUpdateProperty(String, Object)
Add or update a tracked property.
Declaration
public void AddOrUpdateProperty(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
String | name | The property name. |
Object | value | The property. |
Log(LogLevel, Exception)
Log an Exception for a specified log level.
Declaration
public void Log(LogLevel level, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The log level. |
Exception | exception | The exception to log. |
Log(LogLevel, Exception, String)
Log an Exception for a specified log level.
Declaration
public void Log(LogLevel level, Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The log level. |
Exception | exception | The exception to log. |
String | message | The log message. |
Log(LogLevel, Exception, String, Object[])
Log an Exception for a specified log level.
Declaration
public void Log(LogLevel level, Exception exception, string message, object[] messageArgs)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | |
Exception | exception | |
String | message | The log message. |
Object[] | messageArgs | The message arguments. |
Log(LogLevel, String)
Log a message for a specified log level.
Declaration
public void Log(LogLevel level, string message)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The log level. |
String | message | The log message. |
Log(LogLevel, String, Object[])
Log a message for a specified log level.
Declaration
public void Log(LogLevel level, string message, object[] messageArgs)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | The log level. |
String | message | The log message. |
Object[] | messageArgs | The message arguments. |
RemoveProperty(String)
Remove a tracked property.
Declaration
public void RemoveProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The property name. |