C# Класс Zazzles.Log

Handle all interaction with the log file
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CleanLog ( FileSystemInfo logFile ) : void

Wipe the log

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

Описание методов

Action() публичный статический Метод

public static Action ( string action ) : void
action string
Результат void

ActionFail() публичный статический Метод

Log a colored [Fail]
public static ActionFail ( ) : void
Результат void

ActionPass() публичный статический Метод

Log a colored [Pass]
public static ActionPass ( ) : void
Результат void

ActionResult() публичный статический Метод

public static ActionResult ( bool success ) : void
success bool
Результат void

Debug() публичный статический Метод

public static Debug ( string caller, string message ) : void
caller string
message string
Результат void

Divider() публичный статический Метод

Write a divider to the log
public static Divider ( ) : void
Результат void

Entry() публичный статический Метод

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
Результат void

Entry() публичный статический Метод

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
Результат void

Error() публичный статический Метод

public static Error ( string caller, Exception ex ) : void
caller string
ex System.Exception
Результат void

Error() публичный статический Метод

public static Error ( string caller, string message ) : void
caller string
message string
Результат void

Header() публичный статический Метод

Write a header to the log
public static Header ( string text ) : void
text string The text to put in the center of the header
Результат void

NewLine() публичный статический Метод

Write a new line to the log
public static NewLine ( ) : void
Результат void

PaddedHeader() публичный статический Метод

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
Результат void

UnhandledException() публичный статический Метод

public static UnhandledException ( object sender, UnhandledExceptionEventArgs ex ) : void
sender object
ex System.UnhandledExceptionEventArgs
Результат void

Write() публичный статический Метод

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
Результат void

Write() публичный статический Метод

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
Результат void

WriteLine() публичный статический Метод

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
Результат void

WriteLine() публичный статический Метод

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
Результат void