Interface IGorgonLog
Provides logging functionality for an application.
Namespace: Gorgon.Diagnostics
Assembly: Gorgon.Core.dll
Syntax
public interface IGorgonLog
Remarks
This object will send logging information to a logging data source. This could be a text file, XML document, a database, etc...
Properties
| Edit this page View SourceLogApplication
Property to return the name of the application that is being logged.
Declaration
string LogApplication { get; }
Property Value
Type | Description |
---|---|
string |
LogFilterLevel
Property to set or return the filtering level of this log.
Declaration
LoggingLevel LogFilterLevel { get; set; }
Property Value
Type | Description |
---|---|
LoggingLevel |
Provider
Property to return the provider for this log.
Declaration
IGorgonLogProvider Provider { get; }
Property Value
Type | Description |
---|---|
IGorgonLogProvider |
Methods
| Edit this page View SourceLogEnd()
Function to perform any one time final logging.
Declaration
void LogEnd()
LogException(Exception)
Function to send an exception to the log.
Declaration
void LogException(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
Exception | ex | The exception to log. |
Remarks
If the LogFilterLevel is set to LoggingLevel.NoLogging
, then the exception will not be logged. If the filter is set to any other setting, it will be logged
regardless of filter level.
LogStart()
Function to perform any one time inital logging.
Declaration
void LogStart()
Print(string, LoggingLevel, params object[])
Function to print a formatted line of text to the log.
Declaration
void Print(string formatSpecifier, LoggingLevel level, params object[] arguments)
Parameters
Type | Name | Description |
---|---|---|
string | formatSpecifier | Format specifier for the line. |
LoggingLevel | level | Level that this message falls under. |
object[] | arguments | List of optional arguments. |