Joutsen Logging v0.5.0+22-gec3d058
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Properties | List of all members
Joutsen.Logging.LogLevel Class Reference

Represents the detail level of a log entry. More...

Public Member Functions

override string ToString ()
 Creates a string representation of the log level. More...
 
override bool Equals (object obj)
 Checks if this instance is equal to another object. More...
 
override int GetHashCode ()
 Calculates a hascode for this instance. More...
 
int CompareTo (object obj)
 
int CompareTo (LogLevel logLevel)
 

Static Public Member Functions

static bool operator> (LogLevel level1, LogLevel level2)
 
static bool operator< (LogLevel level1, LogLevel level2)
 
static bool operator>= (LogLevel level1, LogLevel level2)
 
static bool operator<= (LogLevel level1, LogLevel level2)
 
static bool operator== (LogLevel level1, LogLevel level2)
 
static bool operator!= (LogLevel level1, LogLevel level2)
 
static LogLevel FromName (string name)
 Fetches an instance of the log level by its human readable name. More...
 
static LogLevel FromValue (uint value)
 Fetches an instance of the log level by its numeric value. More...
 

Static Public Attributes

static readonly LogLevel Disabled = new LogLevel(0, "Disabled")
 The lowest level which represents no logging at all. More...
 
static readonly LogLevel Error = new LogLevel(10, "Error")
 A level that represents errors, exceptions and fatal conditions. More...
 
static readonly LogLevel Warning = new LogLevel(100, "Warning")
 A level that represents non-fatal conditions which nevertheless can cause problems. More...
 
static readonly LogLevel Info = new LogLevel(1000, "Info")
 A level that represents messages that help to understand what the programm does without revealing too much of its structure. More...
 
static readonly LogLevel Detail = new LogLevel(10000, "Detail")
 A log level that represents simple debug messages. More...
 
static readonly LogLevel Verbose = new LogLevel(100000, "Verbose")
 The highest detail level possible. More...
 

Protected Member Functions

 LogLevel (uint value)
 Creates a new instance without a human readable name. More...
 
 LogLevel (uint value, String name)
 Creates anew instance with a human readable representation. More...
 

Properties

uint Value [get]
 The numeric value of the log level. More...
 
String Name [get]
 A human readable representation of th elog level. More...
 

Detailed Description

Represents the detail level of a log entry.

Remarks
Instances of this class cannot be created directly but need to be retrieved by using the static methods FromName and FromValue respectively if the constant instances cannot be used directly.
Since
0.4.0

Constructor & Destructor Documentation

◆ LogLevel() [1/2]

Joutsen.Logging.LogLevel.LogLevel ( uint  value)
protected

Creates a new instance without a human readable name.

◆ LogLevel() [2/2]

Joutsen.Logging.LogLevel.LogLevel ( uint  value,
String  name 
)
protected

Creates anew instance with a human readable representation.

Member Function Documentation

◆ CompareTo() [1/2]

int Joutsen.Logging.LogLevel.CompareTo ( LogLevel  logLevel)

◆ CompareTo() [2/2]

int Joutsen.Logging.LogLevel.CompareTo ( object  obj)

◆ Equals()

override bool Joutsen.Logging.LogLevel.Equals ( object  obj)

Checks if this instance is equal to another object.

◆ FromName()

static LogLevel Joutsen.Logging.LogLevel.FromName ( string  name)
static

Fetches an instance of the log level by its human readable name.

◆ FromValue()

static LogLevel Joutsen.Logging.LogLevel.FromValue ( uint  value)
static

Fetches an instance of the log level by its numeric value.

◆ GetHashCode()

override int Joutsen.Logging.LogLevel.GetHashCode ( )

Calculates a hascode for this instance.

◆ operator!=()

static bool Joutsen.Logging.LogLevel.operator!= ( LogLevel  level1,
LogLevel  level2 
)
static

◆ operator<()

static bool Joutsen.Logging.LogLevel.operator< ( LogLevel  level1,
LogLevel  level2 
)
static

◆ operator<=()

static bool Joutsen.Logging.LogLevel.operator<= ( LogLevel  level1,
LogLevel  level2 
)
static

◆ operator==()

static bool Joutsen.Logging.LogLevel.operator== ( LogLevel  level1,
LogLevel  level2 
)
static

◆ operator>()

static bool Joutsen.Logging.LogLevel.operator> ( LogLevel  level1,
LogLevel  level2 
)
static

◆ operator>=()

static bool Joutsen.Logging.LogLevel.operator>= ( LogLevel  level1,
LogLevel  level2 
)
static

◆ ToString()

override string Joutsen.Logging.LogLevel.ToString ( )

Creates a string representation of the log level.

Member Data Documentation

◆ Detail

readonly LogLevel Joutsen.Logging.LogLevel.Detail = new LogLevel(10000, "Detail")
static

A log level that represents simple debug messages.

This level is not necessarily suitable for end users.

◆ Disabled

readonly LogLevel Joutsen.Logging.LogLevel.Disabled = new LogLevel(0, "Disabled")
static

The lowest level which represents no logging at all.

◆ Error

readonly LogLevel Joutsen.Logging.LogLevel.Error = new LogLevel(10, "Error")
static

A level that represents errors, exceptions and fatal conditions.

◆ Info

readonly LogLevel Joutsen.Logging.LogLevel.Info = new LogLevel(1000, "Info")
static

A level that represents messages that help to understand what the programm does without revealing too much of its structure.

◆ Verbose

readonly LogLevel Joutsen.Logging.LogLevel.Verbose = new LogLevel(100000, "Verbose")
static

The highest detail level possible.

It represents a level that contains information about the structure or call order of the programm. This level should only be used for developers.

◆ Warning

readonly LogLevel Joutsen.Logging.LogLevel.Warning = new LogLevel(100, "Warning")
static

A level that represents non-fatal conditions which nevertheless can cause problems.

Property Documentation

◆ Name

String Joutsen.Logging.LogLevel.Name
get

A human readable representation of th elog level.

◆ Value

uint Joutsen.Logging.LogLevel.Value
get

The numeric value of the log level.