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(); }
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); }
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); }
public UnityLoggerFactory() { DefaultConfig = new LogLevelConfig(); this.LogConfigs = new Dictionary <IConfigurableLog, LogLevelConfig>(); this.unityStructuredLogEventWriter = new UnityStructuredLogEventWriter(); }
public UnityLogger(string name, LogLevelConfig config) : base(name, config) { }
public Logger(string name, LogLevelConfig config) { this.Name = name; this.config = config; }