C# Class Terrarium.Tools.ErrorLog

Centralized logging class for loggin handle/unhandled exceptions. This class caches various calls in order to generate a dataset when a fatal error occurs. This dataset is then formatted and sent to the Terrarium Watson Service.
Mostrar archivo Open project: eugeniomiro/Terrarium

Public Methods

Method Description
CreateErrorLogDataSet ( string logType, string errorLog ) : DataSet

Creates an error dataset to be reported to the Terrarium Watson Service. Each dataset has information about the machine, the OS, the version of the game, the type of log, and optionally some an email and user comment.

FormatException ( Exception e ) : string

Formats and exception object. Currently, only the SocketException makes use fo the custom formatting logic. Other formats can easily be added.

LogFailedAssertion ( string message ) : void

Logs a failed assertion. Any failed assertions launch the Watson dialog which is then used to submit an error report to the Terrarium Watson Service.

LogFailedAssertion ( string message, string traces ) : void

Logs a failed assertion. Any failed assertions launch the Watson dialog which is then used to submit an error report to the Terrarium Watson Service.

LogHandledException ( Exception e ) : void

Log handled exceptions. This can be used in order to review handled exceptions to make sure things are happening correctly.

Method Details

CreateErrorLogDataSet() public static method

Creates an error dataset to be reported to the Terrarium Watson Service. Each dataset has information about the machine, the OS, the version of the game, the type of log, and optionally some an email and user comment.
public static CreateErrorLogDataSet ( string logType, string errorLog ) : DataSet
logType string The type of log Assertion or Unhandled Exception generally.
errorLog string The error log text, generally a compilation of the exception and previous tracings.
return System.Data.DataSet

FormatException() public static method

Formats and exception object. Currently, only the SocketException makes use fo the custom formatting logic. Other formats can easily be added.
public static FormatException ( Exception e ) : string
e System.Exception Exception to format
return string

LogFailedAssertion() public static method

Logs a failed assertion. Any failed assertions launch the Watson dialog which is then used to submit an error report to the Terrarium Watson Service.
public static LogFailedAssertion ( string message ) : void
message string Message for the assertion
return void

LogFailedAssertion() public static method

Logs a failed assertion. Any failed assertions launch the Watson dialog which is then used to submit an error report to the Terrarium Watson Service.
public static LogFailedAssertion ( string message, string traces ) : void
message string Message for the assertion
traces string A series of cached previous tracings
return void

LogHandledException() public static method

Log handled exceptions. This can be used in order to review handled exceptions to make sure things are happening correctly.
public static LogHandledException ( Exception e ) : void
e System.Exception Exception to handle
return void