Example #1
0
        public static void Init(LogConfig config)
        {
            _instance = new LogManager(config);

            string initMessage = $@">>> LogManager initialized successfully. UTC time: {DateTime.UtcNow.ToString("R")}";

            _instance.GetLogger("XLog.LogManager").Info(initMessage);
        }
Example #2
0
        public Logger GetLogger(string tag, LogConfig config = null)
        {
            if (string.IsNullOrEmpty(tag))
            {
                throw new ArgumentNullException(nameof(tag));
            }

            return new Logger(tag, config ?? Config);
        }
Example #3
0
File: Logger.cs Project: syil/XLog
 internal Logger(string tag, LogConfig config)
 {
     Tag     = tag;
     _config = config;
 }
Example #4
0
 private LogManager(LogConfig config)
 {
     Config = config;
 }
Example #5
0
 private LogManager(LogConfig config)
 {
     Config = config;
 }
Example #6
0
 internal Logger(string tag, LogConfig config)
 {
     Tag = tag;
     _config = config;
 }