Example #1
0
File: Log.cs Project: LionFree/Cush
 protected Log(LogConfiguration config, ExceptionWriter writer)
 {
     ThrowHelper.IfNullThenThrow(()=>config);
     LogItems = new ThreadSafeObservableCollection<LogEntry>();
     LogEntries = new ThreadSafeObservableCollection<string>();
     _configuration = config;
     Writer = writer;
 }
 internal ConsoleLogImplementation(LogConfiguration config)
     : base(config, ExceptionWriter.Default)
 {
 }
Example #3
0
 /// <summary>
 ///     Sets the logger configuration.
 /// </summary>
 /// <param name="configuration">
 ///     The <see cref="LogConfiguration" /> to use.
 /// </param>
 public ILogger Configure(LogConfiguration configuration)
 {
     ThrowHelper.IfNullThenThrow(() => configuration);
     Log.Configuration = configuration;
     return this;
 }