The following tables list the members exposed by Log.Config.
Name | Description | |
---|---|---|
![]() ![]() | EventLogName | Sets the event log name we will write events to. |
![]() ![]() | EventLogSource | Sets the event log source we will write events with, It's up to you to register this value. |
![]() ![]() | FormatProvider | Gets or sets the format provider to use when formatting strings |
![]() ![]() | Level | Gets or sets the current log LogLevel |
![]() ![]() | LogFile | Gets or sets the current log file name, insert '{0}' in the file's name to allow log rolling |
![]() ![]() | LogFileMaxHistory | Gets or sets the maximum number of history log files to keep on the system |
![]() ![]() | LogFileMaxSize | Gets or sets the maximum size in bytes the log file is allowed to be before rolling to history |
![]() ![]() | Options | Gets 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.
|
![]() ![]() | Output | Gets or sets the current log LogLevel |
Name | Description | |
---|---|---|
![]() ![]() | SetOutputFormat | Changes 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. |
![]() ![]() | SetOutputLevel | Changes the log level required to write to a specific output device. |