Beispiel #1
0
        /// <summary>
        ///     Creates a new instance with the specified logger name.
        /// </summary>
        /// <param name="type">the class type to generate the logger for</param>
        /// <param name="level">the log level</param>
        /// <param name="bufferFormat">the ByteBuf format</param>
        public LoggingHandler(Type type, LogLevel level, ByteBufferFormat bufferFormat)
        {
            if (type is null)
            {
                ThrowHelper.ThrowNullReferenceException(ExceptionArgument.type);
            }

            Logger        = InternalLoggerFactory.GetInstance(type);
            Level         = level;
            InternalLevel = level.ToInternalLevel();
            BufferFormat  = bufferFormat;
        }
Beispiel #2
0
 /// <summary>
 ///     Creates a new instance whose logger name is the fully qualified class
 ///     name of the instance
 /// </summary>
 /// <param name="level">the log level</param>
 /// <param name="bufferFormat">the ByteBuf format</param>
 public LoggingHandler(LogLevel level, ByteBufferFormat bufferFormat)
     : this(typeof(LoggingHandler), level, bufferFormat)
 {
 }