C# Class Zazzles.Log

Handle all interaction with the log file
Afficher le fichier Open project: FOGProject/zazzles

Méthodes publiques

Méthode Description
Action ( string action ) : void
ActionFail ( ) : void

Log a colored [Fail]

ActionPass ( ) : void

Log a colored [Pass]

ActionResult ( bool success ) : void
Debug ( string caller, string message ) : void
Divider ( ) : void

Write a divider to the log

Entry ( Level level, string caller, string message ) : void

Entry a message

Entry ( string caller, string message ) : void

Entry a message

Error ( string caller, Exception ex ) : void
Error ( string caller, string message ) : void
Header ( string text ) : void

Write a header to the log

NewLine ( ) : void

Write a new line to the log

PaddedHeader ( string text ) : void

Create one header with a divider above and below it

UnhandledException ( object sender, UnhandledExceptionEventArgs ex ) : void
Write ( Level level, string text, ConsoleColor color = ConsoleColor.White ) : void

Write text to the log

Write ( string text, ConsoleColor color = ConsoleColor.White ) : void

Write text to the log

WriteLine ( Level level, string line, ConsoleColor color = ConsoleColor.White ) : void

Write a line to the log

WriteLine ( string line, ConsoleColor color = ConsoleColor.White ) : void

Write a line to the log

Private Methods

Méthode Description
CleanLog ( FileSystemInfo logFile ) : void

Wipe the log

Log ( ) : System
MessageToJSON ( string message ) : Newtonsoft.Json.Linq.JObject

Method Details

Action() public static méthode

public static Action ( string action ) : void
action string
Résultat void

ActionFail() public static méthode

Log a colored [Fail]
public static ActionFail ( ) : void
Résultat void

ActionPass() public static méthode

Log a colored [Pass]
public static ActionPass ( ) : void
Résultat void

ActionResult() public static méthode

public static ActionResult ( bool success ) : void
success bool
Résultat void

Debug() public static méthode

public static Debug ( string caller, string message ) : void
caller string
message string
Résultat void

Divider() public static méthode

Write a divider to the log
public static Divider ( ) : void
Résultat void

Entry() public static méthode

Entry a message
public static Entry ( Level level, string caller, string message ) : void
level Level The logging level
caller string The name of the calling method or class
message string The message to log
Résultat void

Entry() public static méthode

Entry a message
public static Entry ( string caller, string message ) : void
caller string The name of the calling method or class
message string The message to log
Résultat void

Error() public static méthode

public static Error ( string caller, Exception ex ) : void
caller string
ex System.Exception
Résultat void

Error() public static méthode

public static Error ( string caller, string message ) : void
caller string
message string
Résultat void

Header() public static méthode

Write a header to the log
public static Header ( string text ) : void
text string The text to put in the center of the header
Résultat void

NewLine() public static méthode

Write a new line to the log
public static NewLine ( ) : void
Résultat void

PaddedHeader() public static méthode

Create one header with a divider above and below it
public static PaddedHeader ( string text ) : void
text string The text to put in the center of the header
Résultat void

UnhandledException() public static méthode

public static UnhandledException ( object sender, UnhandledExceptionEventArgs ex ) : void
sender object
ex System.UnhandledExceptionEventArgs
Résultat void

Write() public static méthode

Write text to the log
public static Write ( Level level, string text, ConsoleColor color = ConsoleColor.White ) : void
level Level The logging level
text string The text to write
color ConsoleColor The color of the text if in Console mode, White will use the default color
Résultat void

Write() public static méthode

Write text to the log
public static Write ( string text, ConsoleColor color = ConsoleColor.White ) : void
text string The text to write
color ConsoleColor The color of the text if in Console mode
Résultat void

WriteLine() public static méthode

Write a line to the log
public static WriteLine ( Level level, string line, ConsoleColor color = ConsoleColor.White ) : void
level Level The logging level
line string The line to write
color ConsoleColor The color of the text if in Console mode
Résultat void

WriteLine() public static méthode

Write a line to the log
public static WriteLine ( string line, ConsoleColor color = ConsoleColor.White ) : void
line string The line to write
color ConsoleColor The color of the text if in Console mode
Résultat void