- Cost per call 0.005 ms with no context (None)
- Cost per call 0.035 ms with calling method (LogImmediateCaller)
- Cost per call 0.060 ms with calling method & assembly info (LogImmediateCaller | LogAddAssemblyInfo)
- Cost per call 0.160 ms with calling method & file info (LogImmediateCaller | LogAddFileInfo)
- Cost per call 0.190 ms with calling method & assembly info & file info (LogImmediateCaller | LogAddAssemblyInfo | LogAddFileInfo)
Visual Basic (Declaration) | |
---|---|
Public Shared Property Options As LogOptions |
C# | |
---|---|
public static LogOptions Options {get; set;} |
C# | ![]() |
---|---|
base.Setup(); Log.Config.Output = LogOutputs.TraceWrite; Log.Config.Options = LogOptions.LogAddAssemblyInfo | LogOptions.LogAddFileInfo | LogOptions.Default; Log.Config.Level = LogLevels.Verbose; Log.Config.SetOutputFormat(LogOutputs.TraceWrite, "NegativeTests: {FULLMESSAGE}"); _out = Console.Out; _error = Console.Error; Console.SetOut(new StringWriter()); Console.SetError(new StringWriter()); |
VB.NET | ![]() |
---|---|
MyBase.Setup() Log.Config.Output = LogOutputs.TraceWrite Log.Config.Options = LogOptions.LogAddAssemblyInfo Or LogOptions.LogAddFileInfo Or LogOptions.[Default] Log.Config.Level = LogLevels.Verbose Log.Config.SetOutputFormat(LogOutputs.TraceWrite, "NegativeTests: {FULLMESSAGE}") _out = Console.Out _error = Console.[Error] Console.SetOut(New StringWriter()) Console.SetError(New StringWriter()) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
Log.Config ClassLog.Config Members
LogOptions
Source Code
Log/Log.csTools/CmdTool/Config.cs