Gorgon
Show / Hide Table of Contents

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 Source

LogApplication

Property to return the name of the application that is being logged.

Declaration
string LogApplication { get; }
Property Value
Type Description
string
| Edit this page View Source

LogFilterLevel

Property to set or return the filtering level of this log.

Declaration
LoggingLevel LogFilterLevel { get; set; }
Property Value
Type Description
LoggingLevel
| Edit this page View Source

Provider

Property to return the provider for this log.

Declaration
IGorgonLogProvider Provider { get; }
Property Value
Type Description
IGorgonLogProvider

Methods

| Edit this page View Source

LogEnd()

Function to perform any one time final logging.

Declaration
void LogEnd()
| Edit this page View Source

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.

| Edit this page View Source

LogStart()

Function to perform any one time inital logging.

Declaration
void LogStart()
| Edit this page View Source

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.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author