NET Logging Library
Fatal(String,String) Method
Example 



KellermanSoftware.NetLoggingLibrary Namespace > Log Class > Fatal Method : Fatal(String,String) Method
The application is about to crash. Log a fatal message.
Syntax
Public Overloads Shared Function Fatal( _
   ByVal message As String, _
   ByVal additionalInfo As String _
) As LogResponse
Dim message As String
Dim additionalInfo As String
Dim value As LogResponse
 
value = Log.Fatal(message, additionalInfo)
public static LogResponse Fatal( 
   string message,
   string additionalInfo
)
public:
static LogResponse^ Fatal( 
   String^ message,
   String^ additionalInfo
) 

Parameters

message
additionalInfo
Example
//Licensed Mode
//Log.UserName = "User Name From Receipt";
//Log.LicenseKey = "LicenseKey From Receipt";            
 
//Clear all configuration
Log.ResetConfiguration();
 
//Add a new target, you can also define targets in an xml file, app.config, or web.config
FileTarget fileTarget = new FileTarget(Environment.CurrentDirectory + "\\fileLogger.txt");
Log.Config.Targets.Add(fileTarget);
 
string message = "Test Message";
string additionalInfo = "Additional Info";
 
//Log a message as a level Fatal Message
Log.Fatal(message, additionalInfo);
'Licensed Mode
'Log.UserName = "User Name From Receipt";
'Log.LicenseKey = "LicenseKey From Receipt";            
 
'Clear all configuration
Log.ResetConfiguration()
 
'Add a new target, you can also define targets in an xml file, app.config, or web.config
Dim fileTarget As New FileTarget(Environment.CurrentDirectory & "\fileLogger.txt")
Log.Config.Targets.Add(fileTarget)
 
Dim message As String = "Test Message"
Dim additionalInfo As String = "Additional Info"
 
'Log a message as a level Fatal Message
Log.Fatal(message, additionalInfo)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Log Class
Log Members
Overload List