Beispiel #1
0
        internal ScopedLogger(IEasyLogger logger, string scopeName, EasyLogLevel level)
        {
            _scopeName = scopeName;
            _logger    = logger;
            _level     = level;

            Log(string.Concat(OpenLeft, _scopeName, OpenRight));
        }
 /// <summary>
 /// Returns a <see cref="ScopedLogger"/> which provides ability to mark the
 /// begin and end of a scope defined by <paramref name="name"></paramref>.
 /// </summary>
 /// <param name="logger">The logger</param>
 /// <param name="name">The name of the scope</param>
 /// <param name="level">The level at which the scope should be logged</param>
 /// <returns>The scoped logger</returns>
 public static ScopedLogger GetScopedLogger(this IEasyLogger logger, string name, EasyLogLevel level) =>
 new ScopedLogger(logger, name, level);