Example #1
0
 internal static ServiceLogDebug Create(RecoveryConfigLog logDef)
 {
     return(new ServiceLogDebug
     {
         Level = logDef.Enums.Level
     });
 }
Example #2
0
        internal static IServiceLog Create(RecoveryConfigLog logDef)
        {
            var source = logDef.Path;

            if (!EventLog.SourceExists(source))
            {
                EventLog.CreateEventSource(source, "Application");
            }
            return(new ServiceLogEvent(new StringSourceProvider(source))
            {
                Level = logDef.Enums.Level
            });
        }
Example #3
0
        public static ServiceLogFile Create(RecoveryConfigLog def)
        {
            var fi = new FileInfo(def.Path);
            var di = fi.Directory;

            if (!di.Exists)
            {
                di.Create();
            }
            var writer = new StreamWriter(fi.Open(FileMode.Create, FileAccess.ReadWrite, FileShare.Read))
            {
                AutoFlush = true
            };

            return(new ServiceLogFile(fi, writer)
            {
                Level = def.Enums.Level
            });
        }
Example #4
0
 public Accessor(RecoveryConfigLog owner)
 {
     m_owner = owner;
 }