コード例 #1
0
 private void DrawLogLevelConfig(LogLevelConfig cfg)
 {
     GUILayout.BeginHorizontal();
     cfg.Trace   = GUILayout.Toggle(cfg.Trace, "Trace");
     cfg.Debug   = GUILayout.Toggle(cfg.Debug, "Debug");
     cfg.Info    = GUILayout.Toggle(cfg.Info, "Info");
     cfg.Warning = GUILayout.Toggle(cfg.Warning, "Warning");
     cfg.Error   = GUILayout.Toggle(cfg.Error, "Error");
     cfg.Fatal   = GUILayout.Toggle(cfg.Fatal, "Fatal");
     GUILayout.EndHorizontal();
 }
コード例 #2
0
        protected override IStandardLog CreateLoggerInstance(ILogSource source)
        {
            var config = new LogLevelConfig();

            config.CopyFrom(this.PickConfig(source));

            var logger = new UnityLogger(source, config);

            this.LogConfigs.Add(logger, config);

            return(logger);
        }
コード例 #3
0
        protected override IStructuredLog CreateStructuredLogInstance(ILogSource source)
        {
            var config = new LogLevelConfig();

            config.CopyFrom(this.PickConfig(source));

            var logger = new StructuredLogger(
                source,
                new LogLevelStatus(config),
                this.unityStructuredLogEventWriter);

            this.LogConfigs.Add(logger, config);

            return(logger);
        }
コード例 #4
0
 public UnityLoggerFactory()
 {
     DefaultConfig   = new LogLevelConfig();
     this.LogConfigs = new Dictionary <IConfigurableLog, LogLevelConfig>();
     this.unityStructuredLogEventWriter = new UnityStructuredLogEventWriter();
 }
コード例 #5
0
 public UnityLogger(string name, LogLevelConfig config)
     : base(name, config)
 {
 }
コード例 #6
0
 public Logger(string name, LogLevelConfig config)
 {
     this.Name   = name;
     this.config = config;
 }