CSharpTest.Net
Log.Config Class Members
See Also  Properties  Methods  Send Feedback Download Help File
CSharpTest.Net.Logging Assembly > (Global) Namespace : Log.Config Class


Glossary Item Box

The following tables list the members exposed by Log.Config.

Public Properties

 NameDescription
Public Propertystatic (Shared in Visual Basic)EventLogNameSets the event log name we will write events to.  
Public Propertystatic (Shared in Visual Basic)EventLogSourceSets the event log source we will write events with, It's up to you to register this value.  
Public Propertystatic (Shared in Visual Basic)FormatProviderGets or sets the format provider to use when formatting strings  
Public Propertystatic (Shared in Visual Basic)LevelGets or sets the current log LogLevel  
Public Propertystatic (Shared in Visual Basic)LogFileGets or sets the current log file name, insert '{0}' in the file's name to allow log rolling  
Public Propertystatic (Shared in Visual Basic)LogFileMaxHistoryGets or sets the maximum number of history log files to keep on the system  
Public Propertystatic (Shared in Visual Basic)LogFileMaxSizeGets or sets the maximum size in bytes the log file is allowed to be before rolling to history  
Public Propertystatic (Shared in Visual Basic)OptionsGets or sets the availability of stack info etc. The following performance characterists were taken with a simple example app running 10 threads each writing 1000 log statements in a tight-loop. The times below reflect threading enabled (someone having called Log.AppStart()). The following hardware was used: AMD Turion 64x2 TL-62 2.10 GHz, 3 GB RAM running Vista 32-bit SP1 (HP Notebook). The time indicated below was estimated by taking the total number of milliseconds until all threads completed and dividing by the 10,000 messages that were written.
  • 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)
 
Public Propertystatic (Shared in Visual Basic)OutputGets or sets the current log LogLevel  
Top

Public Methods

 NameDescription
Public Methodstatic (Shared in Visual Basic)SetOutputFormatChanges the output format used to write to a specific output device. The format of this string behaves just like EventData.ToString(). The string can contain any public field or property available for the CSharpTest.Net.Logging.EventData class surrounded by braces {} and yes, properties/fields are case sensative. The input string should look something like the following examples: "[{ManagedThreadId:D2}] {Level,8} - {Message}{Location}{Exception}" -- this is the default format of ToString() "{EventTime:o} [{ProcessId:D4},{ManagedThreadId:D2}] {Level,8} - {Message}{Location}{Exception}" -- This is the default log file format.  
Public Methodstatic (Shared in Visual Basic)SetOutputLevelChanges the log level required to write to a specific output device.  
Top

See Also

Generated with Document! X 2011 by Innovasys