예제 #1
0
 /// <summary>
 /// Initializes a new instance of the LogMarshal using the specified <see cref="Logging.ILog"/> to perform the actual logging.
 /// </summary>
 /// <param name="log">The hosted <see cref="Logging.ILog"/>.</param>
 /// <param name="logSettings">The log settings.</param>
 public LogMarshal(Logging.ILog log,
                   LogControllerSettings logSettings)
     : this()
 {
     _ActualLog   = log ?? throw new ArgumentNullException(nameof(log));
     _LogSettings = logSettings ?? throw new ArgumentNullException(nameof(logSettings));
 }
예제 #2
0
 public LogControllerThreadWorker(LogMarshal logMarshal,
                                  LogControllerSettings logSettings,
                                  Logging.ILogStatistics logStats,
                                  FileStorage.IFileStore archiveFileStore,
                                  IArchiveFilenameFactory archiveFilenameFactory)
 {
     _LogMarshal             = logMarshal;
     _LogSettings            = logSettings;
     _LogStats               = logStats;
     _ArchiveFileStore       = archiveFileStore;
     _ArchiveFilenameFactory = archiveFilenameFactory;
 }
예제 #3
0
 /// <summary>
 /// Instantiates a new <see cref="LogController"/>.
 /// </summary>
 /// <param name="log">The <see cref="Logging.ILog"/>-based logger used to write the actual logs.</param>
 /// <param name="logArchiveFileStore">A <see cref="FileStorage.IFileStore"/> when log archives will be created.</param>
 /// <param name="archiveFilenameFactory">A <see cref="IArchiveFilenameFactory"/> used to create archive log file names.</param>
 /// <param name="logControllerSettings">Settings to control the actions of the <see cref="ILogController"/>.</param>
 public LogController(Logging.ILog log,
                      FileStorage.IFileStore logArchiveFileStore,
                      IArchiveFilenameFactory archiveFilenameFactory,
                      LogControllerSettings logControllerSettings)
     : this()
 {
     if (log == null)
     {
         throw new ArgumentNullException(nameof(log));
     }
     // **** turn OFF auto-truncation if it is the known interface:{Logging.ITruncatable}
     if (log is Logging.ITruncatable)
     {
         (log as Logging.ITruncatable).AutoTruncateEnabled = false;
     }
     //
     _Log                    = log;
     Settings                = logControllerSettings ?? throw new ArgumentNullException(nameof(logControllerSettings));
     _LogArchiveFileStore    = logArchiveFileStore ?? throw new ArgumentNullException(nameof(logArchiveFileStore));
     _ArchiveFilenameFactory = archiveFilenameFactory ?? throw new ArgumentNullException(nameof(archiveFilenameFactory));
 }