Public Shared ReadOnly Property LoggingException As Exception
public static Exception LoggingException {get;}
public: static property Exception^ LoggingException { Exception^ get(); }
Public Shared ReadOnly Property LoggingException As Exception
public static Exception LoggingException {get;}
public: static property Exception^ LoggingException { Exception^ get(); }
//Licensed Mode //Log.UserName = "User Name From Receipt"; //Log.LicenseKey = "LicenseKey From Receipt"; //Clear all configuration Log.ResetConfiguration(); //Enable fail safe logging (this is the default) Log.Config.IsFailSafeLoggingEnabled = true; //Set up a file logger with a bad configuration FileTarget target = new FileTarget("c:\\somepaththatdoesntexist\\log.txt"); Log.Config.Targets.Add(target); //No exception will be thrown because we are in fail safe logging Log.Debug("This is a test"); //There will be an exception placed in this property Console.WriteLine(Log.LoggingException.ToString());
'Licensed Mode 'Log.UserName = "User Name From Receipt"; 'Log.LicenseKey = "LicenseKey From Receipt"; 'Clear all configuration Log.ResetConfiguration() 'Enable fail safe logging (this is the default) Log.Config.IsFailSafeLoggingEnabled = True 'Set up a file logger with a bad configuration Dim target As New FileTarget("c:\somepaththatdoesntexist\log.txt") Log.Config.Targets.Add(target) 'No exception will be thrown because we are in fail safe logging Log.Debug("This is a test") 'There will be an exception placed in this property Console.WriteLine(Log.LoggingException.ToString())
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