Esempio n. 1
0
        internal InternalLogger()
        {
            MethodBase?methodInfo = new StackTrace().GetFrame(1)?.GetMethod();
            string?    className  = methodInfo?.ReflectedType?.Name;

            Identifier = !string.IsNullOrEmpty(className) ? className : "Unspecified";
            LogModule  = InternalLogManager.GetOrCreateLogger(Identifier);
        }
Esempio n. 2
0
        internal static InternalLogger GetOrCreateLogger <T>(T type, string identifier)
        {
            if (string.IsNullOrEmpty(identifier))
            {
                throw new ArgumentNullException(nameof(identifier));
            }

            return(new InternalLogger(InternalLogManager.GetOrCreateLoggerForType <T>(type, identifier), identifier));
        }
Esempio n. 3
0
 internal InternalLogger(string loggerIdentifier)
 {
     Identifier = loggerIdentifier ?? throw new ArgumentNullException(nameof(loggerIdentifier));
     LogModule  = InternalLogManager.GetOrCreateLogger(Identifier);
 }