Skip to content

Logging

Tomáš Bouda edited this page Nov 22, 2017 · 1 revision

🔴 Type Logging.Logger

Provides methods for logging into console and text file with additional informations


🔸 Property Logging.Logger.LogFile

Path to a log file


🔹 Method Logging.Logger.Error(System.Exception,System.String,System.String,System.Int32)

Writes Error into console and file LogFile with additional information about caller method, class and line

Param Description
ex
callerName
callerFilePath
callerLine

🔹 Method Logging.Logger.Info(System.String,System.String,System.String,System.Int32)

Writes Info into console and file LogFile with additional information about caller method, class and line

Param Description
text
callerName
callerFilePath
callerLine

🔹 Method Logging.Logger.Info(System.String,System.ConsoleColor,System.String,System.String,System.Int32)

Writes Info into console and file LogFile

Param Description
text
color
callerName
callerFilePath
callerLine

🔹 Method Logging.Logger.Info(System.Object,System.String,System.String,System.Int32)

Writes Info into console and file LogFile with additional information about caller method, class and line

Param Description
text
callerName
callerFilePath
callerLine

🔹 Method Logging.Logger.Warning(System.String,System.String,System.String,System.Int32)

Writes Warning into console and file LogFile with additional information about caller method, class and line

Param Description
text
callerName
callerFilePath
callerLine

🔴 Type Logging.ThreadSafeLogger

Thread safe logger


🔸 Property Logging.ThreadSafeLogger.LogFilePath

Gets logger file path


🔸 Property Logging.ThreadSafeLogger.Instance

Returns instance of logger


🔹 Method Logging.ThreadSafeLogger.SetLogFile(System.String)

Sets log file location Note: Default location is application base directory

Param Description
pathToFile

🔹 Method Logging.ThreadSafeLogger.AddMessage(System.String)

Adds message to queue

Param Description
message

🔹 Method Logging.ThreadSafeLogger.DispatchMesages

Log all messages in queue


🔹 Method Logging.ThreadSafeLogger.Dispose

Disposes queue