Ejemplo n.º 1
0
 private void WriteLogIfLogElementIsEnabled(Log log, LogElement logElement)
 {
     if (logElement.IsEnabled())
     {
         LogWriter.WriteLog(log, logElement);
     }
 }
Ejemplo n.º 2
0
 private void WriteLogIfLogElementIsEnabled(Log log, LogElement logElement)
 {
     if (logElement.IsEnabled())
     {
         LogWriter.WriteLog(log, logElement);
     }
 }
Ejemplo n.º 3
0
 private void WriteLogToFile(Log log, LogElement logElement)
 {
     StreamWriter fileDescriptor = File.AppendText(logElement.FilePath);
     string logLine = CreateLogLine(log);
     fileDescriptor.WriteLine(logLine);
     fileDescriptor.Close();
 }
Ejemplo n.º 4
0
        private void WriteLogToFile(Log log, LogElement logElement)
        {
            StreamWriter fileDescriptor = File.AppendText(logElement.FilePath);
            string       logLine        = CreateLogLine(log);

            fileDescriptor.WriteLine(logLine);
            fileDescriptor.Close();
        }
Ejemplo n.º 5
0
        /**
         * @see FileWriter
         */
        public void WriteLog(Log log, LogElement logElement)
        {
            if (EventLogSourceDoesNotExist())
            {
                CreateEventLogSourceForLevel(log.Level);
            }

            WriteLogToEventLog(log);
        }
 private void LoadLogElementIntoLogLevelFiles(LogElement log)
 {
     ArrayList logs;
     if (!LogLevelFiles.TryGetValue(log.Level, out logs))
     {
         logs = new ArrayList();
         LogLevelFiles.Add(log.Level, logs);
     }
     logs.Add(log);
 }
Ejemplo n.º 7
0
        private void LoadLogElementIntoLogLevelFiles(LogElement log)
        {
            ArrayList logs;

            if (!LogLevelFiles.TryGetValue(log.Level, out logs))
            {
                logs = new ArrayList();
                LogLevelFiles.Add(log.Level, logs);
            }
            logs.Add(log);
        }
Ejemplo n.º 8
0
 /**
  * @see FileWriter
  */
 public void WriteLog(Log log, LogElement logElement)
 {
     try
     {
         if (!File.Exists(logElement.FilePath))
         {
             File.Create(logElement.FilePath);
         }
         WriteLogToFile(log, logElement);
     }
     catch (IOException)
     {
         throw new WritingException(logElement.FilePath);
     }
 }
Ejemplo n.º 9
0
 /**
  * @see FileWriter
  */
 public void WriteLog(Log log, LogElement logElement)
 {
     try
     {
         if (!File.Exists(logElement.FilePath))
         {
             File.Create(logElement.FilePath);
         }
         WriteLogToFile(log, logElement);
     }
     catch (IOException)
     {
         throw new WritingException(logElement.FilePath);
     }
 }