Ejemplo n.º 1
0
 public void append(string directory, string content)
 {
     try
     {
         _saver.append(directory, content);
     }
     catch (System.IO.IOException e)
     {
         _logger.Log("EXCEPTION: {0}" + Environment.NewLine + "{1}", LogLevel.Basic, e.Message, e.StackTrace);
     }
 }
Ejemplo n.º 2
0
        public void Log(object logMessage, LogLevel loglvevel, params string[] vals)
        {
            try
            {
                string message = logMessage.ToString();
                if (_settings.Get <int>(_names.LogLevel) >= loglvevel.GetHashCode())
                {
                    _saver.append(CurrentLogSaveLocation, string.Format(message, vals) + Environment.NewLine);
                }
            }
            catch
            {
                if (SaveDirectoryExists())
                {
                    throw;
                }

                CreateLogsDirectory();
                Log(logMessage, loglvevel, vals);
            }
        }