CSharpTest.Net
Critical(Exception) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Logging Assembly > (Global) Namespace > Log Class > Critical Method : Critical(Exception) Method

e

Glossary Item Box

Logs a Critical error

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub Critical( _
   ByVal e As Exception _
) 
C# 
public static void Critical( 
   Exception e
)

Parameters

e

Example

Log/Test/NegativeTests.cs

C#Copy Code
IDisposable disp = Log.AppStart(null);
disp.Dispose();
disp.Dispose();
foreach( string format in badFormats )
    Log.AppStart(format, i_blow_up).Dispose();

disp = Log.Start(null);
disp.Dispose();
disp.Dispose();
foreach (string format in badFormats)
    Log.AppStart(format, i_blow_up).Dispose();

foreach (string format in badFormats)
    Log.Write(format, i_blow_up);

foreach (string format in badFormats)
    Log.Critical(format, i_blow_up);
foreach (string format in badFormats)
    Log.Critical(i_blow_up, format, i_blow_up);
Log.Critical(i_blow_up);

foreach (string format in badFormats)
    Log.Error(format, i_blow_up);
foreach (string format in badFormats)
    Log.Error(i_blow_up, format, i_blow_up);
Log.Error(i_blow_up);

foreach (string format in badFormats)
    Log.Warning(format, i_blow_up);
foreach (string format in badFormats)
    Log.Warning(i_blow_up, format, i_blow_up);
Log.Warning(i_blow_up);

foreach (string format in badFormats)
    Log.Info(format, i_blow_up);
foreach (string format in badFormats)
    Log.Info(i_blow_up, format, i_blow_up);
Log.Info(i_blow_up);

foreach (string format in badFormats)
    Log.Verbose(format, i_blow_up);
foreach (string format in badFormats)
    Log.Verbose(i_blow_up, format, i_blow_up);
Log.Verbose(i_blow_up);
VB.NETCopy Code
Dim disp As IDisposable = Log.AppStart(Nothing)
disp.Dispose()
disp.Dispose()
For Each format As String In badFormats
    Log.AppStart(format, i_blow_up).Dispose()
Next

disp = Log.Start(Nothing)
disp.Dispose()
disp.Dispose()
For Each format As String In badFormats
    Log.AppStart(format, i_blow_up).Dispose()
Next

For Each format As String In badFormats
    Log.Write(format, i_blow_up)
Next

For Each format As String In badFormats
    Log.Critical(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Critical(i_blow_up, format, i_blow_up)
Next
Log.Critical(i_blow_up)

For Each format As String In badFormats
    Log.[Error](format, i_blow_up)
Next
For Each format As String In badFormats
    Log.[Error](i_blow_up, format, i_blow_up)
Next
Log.[Error](i_blow_up)

For Each format As String In badFormats
    Log.Warning(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Warning(i_blow_up, format, i_blow_up)
Next
Log.Warning(i_blow_up)

For Each format As String In badFormats
    Log.Info(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Info(i_blow_up, format, i_blow_up)
Next
Log.Info(i_blow_up)

For Each format As String In badFormats
    Log.Verbose(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Verbose(i_blow_up, format, i_blow_up)
Next
Log.Verbose(i_blow_up)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys