Ejemplo n.º 1
0
        public void Log(LogLevel level, FileRange position, string message, Exception innerException)
        {
            if (level >= LogLevel.Error)
            {
                HasErrors = true;
            }

            underlying.Log(level, position, message, innerException);
        }
Ejemplo n.º 2
0
        public void Log(LogLevel level, FileRange position, string message, Exception innerException)
        {
            logger.Log(level, new EventId(), (object)null, innerException, (state, ex) =>
            {
                var builder = new StringBuilder();
                builder.Append($"{level.ToString().ToUpperInvariant()} {fileName}({position.StartLine},{position.StartCol}:{position.EndLine},{position.EndCol}): {message}");

                if (ex != null)
                {
                    builder.AppendLine();
                    builder.Append(ex);
                }

                return(builder.ToString());
            });
        }
Ejemplo n.º 3
0
 public void Log(LogLevel level, FileRange position, string message, Exception innerException)
 {
     // Do nothing
 }