public AsyncLogWrapper(string logFileName, LogHeaderFormatter logHeaderFormatter, string logComponentName) { ArgumentValidator.ThrowIfNullOrEmpty("logFileName", logFileName); ArgumentValidator.ThrowIfNull("logHeaderFormatter", logHeaderFormatter); ArgumentValidator.ThrowIfNullOrEmpty("logComponentName", logComponentName); this.asyncLog = new AsyncLog(logFileName, logHeaderFormatter, logComponentName); }
public CertificateLog(string logDirectory, long maxDirectorySize, long maxFileSize, int maxBufferSize, TimeSpan flushInterval) { this.logSchema = new LogSchema("Microsoft Exchange Server", "15.0.0.0", "Certificate Log", CertificateInformation.GetColumnHeaders()); LogHeaderFormatter headerFormatter = new LogHeaderFormatter(this.logSchema, LogHeaderCsvOption.CsvStrict); this.exlog = new Log(CertificateLog.LogFilePrefix, headerFormatter, "Certificate Log"); this.exlog.Configure(logDirectory, TimeSpan.Zero, maxDirectorySize, maxFileSize, maxBufferSize, flushInterval, true); }
public UnifiedAuditLogger() { string[] fields = (from f in LocalQueueCsvFields.Fields select f.Name).ToArray <string>(); this.logSchema = new LogSchema("Microsoft Exchange", "15.00.1497.012", "audit", fields); LogHeaderFormatter headerFormatter = new LogHeaderFormatter(this.logSchema, LogHeaderCsvOption.NotCsvCompatible); this.localQueue = new Log("audit", headerFormatter, "Exchange"); UnifiedAuditLoggerSettings unifiedAuditLoggerSettings = UnifiedAuditLoggerSettings.Load(); this.localQueue.Configure(Path.Combine(unifiedAuditLoggerSettings.DirectoryPath, "Exchange"), unifiedAuditLoggerSettings.MaxAge, (long)unifiedAuditLoggerSettings.MaxDirectorySize.ToBytes(), (long)unifiedAuditLoggerSettings.MaxFileSize.ToBytes(), (int)unifiedAuditLoggerSettings.CacheSize.ToBytes(), unifiedAuditLoggerSettings.FlushInterval, unifiedAuditLoggerSettings.FlushToDisk); }
public ExFileLog(string logDirectory) { string[] fields = new string[] { "date-time", "log-level", "thread-id", "message" }; this.logSchema = new LogSchema("Microsoft Exchange Server", "15.0.0.0", "Diagnostics Service Log", fields); LogHeaderFormatter headerFormatter = new LogHeaderFormatter(this.logSchema, LogHeaderCsvOption.CsvStrict); this.exlog = new Log("DiagnosticsServiceLog", headerFormatter, "Diagnostics Service Log"); this.exlog.Configure(logDirectory, TimeSpan.Zero, 104857600L, 10485760L, 1024, TimeSpan.FromSeconds(5.0), true); }
// Token: 0x060001A9 RID: 425 RVA: 0x00006EB8 File Offset: 0x000050B8 protected ActivityContextLogger(string fileNamePrefix) { this.SafeTraceDebug(0L, "Start creating {0}.", new object[] { this.LogTypeName }); string version = "0.0.0.0"; Version version2 = Assembly.GetExecutingAssembly().GetName().Version; if (version2 != null) { version = version2.ToString(); } this.LogSchema = new LogSchema("Microsoft Exchange", version, this.LogTypeName, this.GetLogFields()); LogHeaderFormatter headerFormatter = new LogHeaderFormatter(this.LogSchema); string fileNamePrefix2 = string.IsNullOrWhiteSpace(fileNamePrefix) ? this.FileNamePrefix : fileNamePrefix; this.Log = new Log(fileNamePrefix2, headerFormatter, this.LogComponentName); ActivityContextLogFileSettings logFileSettings = this.GetLogFileSettings(); if (logFileSettings.Enabled) { this.Enabled = true; this.Log.Configure(logFileSettings.DirectoryPath, logFileSettings.MaxAge, (long)logFileSettings.MaxDirectorySize.ToBytes(), (long)logFileSettings.MaxFileSize.ToBytes(), (int)logFileSettings.CacheSize.ToBytes(), logFileSettings.FlushInterval, logFileSettings.FlushToDisk); this.InternalConfigure(logFileSettings); this.SafeTraceDebug(0L, "{0} is configured.", new object[] { this.LogTypeName }); } else { this.Enabled = false; this.SafeTraceDebug(0L, "{0} is disabled.", new object[] { this.LogTypeName }); } this.SafeTraceDebug(0L, "{0} on server {1} is created and ready for use.", new object[] { this.LogTypeName, this.ServerName }); }
internal AuditingOpticsLoggerInstance(AuditingOpticsLoggerType loggerType) { EnumValidator.AssertValid <AuditingOpticsLoggerType>(loggerType); AuditingOpticsLoggerSettings auditingOpticsLoggerSettings = AuditingOpticsLoggerSettings.Load(); if (auditingOpticsLoggerSettings.Enabled) { this.Enabled = true; this.LoggerType = loggerType; if (this.IsDebugTraceEnabled()) { this.SafeTraceDebug(0L, "Start creating Auditing Optics log.", new object[0]); } this.LogSchema = new LogSchema(AuditingOpticsConstants.SoftwareName, "15.00.1497.012", this.LogTypeName, this.GetLogFields()); LogHeaderFormatter headerFormatter = new LogHeaderFormatter(this.LogSchema); this.Logger = new Log(this.FileNamePrefix, headerFormatter, this.LogComponentName); if (this.IsDebugTraceEnabled()) { this.SafeTraceDebug(0L, "Start configuring the Auditing Optics log.", new object[0]); } this.Logger.Configure(Path.Combine(auditingOpticsLoggerSettings.DirectoryPath, this.FileNamePrefix), auditingOpticsLoggerSettings.MaxAge, (long)auditingOpticsLoggerSettings.MaxDirectorySize.ToBytes(), (long)auditingOpticsLoggerSettings.MaxFileSize.ToBytes(), (int)auditingOpticsLoggerSettings.CacheSize.ToBytes(), auditingOpticsLoggerSettings.FlushInterval, auditingOpticsLoggerSettings.FlushToDisk); if (this.IsDebugTraceEnabled()) { this.SafeTraceDebug(0L, "Auditing Optics log on server '{0}' is created and ready for use.", new object[] { this.ServerName }); return; } } else { this.Enabled = false; if (this.IsDebugTraceEnabled()) { this.SafeTraceDebug(0L, "The Auditing Optics log is disabled.", new object[0]); } } }
private static IAsyncLogWrapper CreateRealAsyncLogWrapper(string logFileName, LogHeaderFormatter logHeaderFormatter, string logComponentName) { return(new AsyncLogWrapper(logFileName, logHeaderFormatter, logComponentName)); }
internal static IAsyncLogWrapper CreateAsyncLogWrapper(string logFileName, LogHeaderFormatter logHeaderFormatter, string logComponentName) { return(AsyncLogWrapperFactory.CreateAsyncLogWrapperFunc(logFileName, logHeaderFormatter, logComponentName)); }