public void Log(LoggedFeature loggedFeature, string format, params object[] tokens) { if (!LoggingConfig.ShouldLogFeature(loggedFeature)) { return; } string formatedMessage = FormatFeatureString(loggedFeature.name, format); LogValue(formatedMessage, Debug.Log, tokens); }
public override bool Equals(object obj) { if (obj == null) { return(false); } LoggedFeature other = (LoggedFeature)obj; return(other.name.Equals(name)); }
public static bool ShouldLogFeature(LoggedFeature feature) { #if UNITY_EDITOR // By default, log everything but todos. if (!EditorPrefs.HasKey(kConfigPrefix + feature)) { return(feature != LoggedFeature.TODO); } return(EditorPrefs.GetBool(kConfigPrefix + feature)); #else return(feature != LoggedFeature.TODO); #endif }
public void LogError(LoggedFeature loggedFeature, string format, params object[] tokens) { string formatedMessage = FormatFeatureString(loggedFeature.name, format); LogValue(formatedMessage, Debug.LogError, tokens); }
private static void Register(LoggedFeature feature) { _features.Add(feature); }
public static void SetShouldLogFeature(LoggedFeature feature, bool shouldLog) { #if UNITY_EDITOR EditorPrefs.SetBool(kConfigPrefix + feature, shouldLog); #endif }