Exemplo n.º 1
0
        public BasicLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                               int skipFrames, Exception exception, bool attributeToException, string caption, string description, params object[] args)
            : base(severity, logSystem, categoryName, skipFrames + 1, false, attributeToException, exception)
        {
            WriteMode  = writeMode;
            Exception  = exception;
            DetailsXml = null;

            Caption     = caption;
            Description = description;
            MessageArgs = args;
        }
Exemplo n.º 2
0
        public SimpleLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                                int skipFrames, Exception exception, string message, params object[] args)
            : base(severity, logSystem, categoryName, skipFrames + 1, false, false, null)
        {
            WriteMode  = writeMode;
            Exception  = exception;
            DetailsXml = null;

            Caption     = null; // null signals that we need to split the description to find the caption when publishing.
            Description = message;
            MessageArgs = args;
        }
Exemplo n.º 3
0
        internal LocalLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                                 int skipFrames, Exception exception, bool attributeToException, string detailsXml, string caption,
                                 string description, params object[] args)
            : base(severity, logSystem, categoryName, skipFrames + 1, true, attributeToException, exception)
        {
            WriteMode  = writeMode;
            Exception  = exception;
            DetailsXml = detailsXml;

            Caption     = caption; // Allow null, which will split it within Description.
            Description = description;
            MessageArgs = args;
        }
Exemplo n.º 4
0
        public DetailLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                                int skipFrames, Exception exception, bool attributeToException, string detailsXml, string caption,
                                string description, params object[] args)
            : base(severity, logSystem, categoryName, skipFrames + 1, false, attributeToException, exception)
        {
            WriteMode  = writeMode;
            Exception  = exception;
            DetailsXml = detailsXml;

            Caption     = caption; // Allow null, or should we force it to string.Empty?  Null will split it within Description.
            Description = description;
            MessageArgs = args;
        }
Exemplo n.º 5
0
 internal LocalLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                          int skipFrames, string detailsXml, string caption, string description, params object[] args)
     : this(severity, writeMode, logSystem, categoryName, skipFrames + 1, null, false, detailsXml, caption, description, args)
 {
 }
Exemplo n.º 6
0
 public void Write(LogMessageSeverity severity, string system, IMessageSourceProvider messageSource, IPrincipal?user, JavaScriptException?jsException,
                   LogWriteMode mode, string detailsBlock, string?category, string?caption, string?description, object[]?parameters)
 {
     Log.Write(severity, system, messageSource, user, jsException, mode, detailsBlock, category, caption, description, parameters);
 }
Exemplo n.º 7
0
 public SimpleLogMessage(LogMessageSeverity severity, LogWriteMode writeMode, string logSystem, string categoryName,
                         int skipFrames, string message, params object[] args)
     : this(severity, writeMode, logSystem, categoryName, skipFrames + 1, FirstException(args), message, args)
 {
 }
Exemplo n.º 8
0
 public DebugRecorder(string path, out Ret ret, FileMode mode = FileMode.OpenOrCreate, FileAccess access = FileAccess.ReadWrite, LogWriteMode write = LogWriteMode.Append)
 {
     try
     {
         _stream = new FileStream(path, mode, access);
         if (write == LogWriteMode.Append)
         {
             _stream.Position = _stream.Length;
         }
         ret = Ret.ok;
     }
     catch (Exception e) { ret = new Ret(LogLevel.Error, RET_STREAM_INIT_ERROR, e.Message); }
     enable = false;
 }