16using System.Collections;
17using System.Collections.Generic;
28 public string TAG =
"TFI";
41 public class Log : Singleton<Log>
45 private ILogger logger = UnityEngine.
Debug.unityLogger;
48 private string tag =
"Tilt Five, Inc.";
57 public static string TAG
60 set => Instance.tag = value;
69 get => Instance.level;
72 Instance.level = value;
75 Instance.logger.filterLogType = LogType.Log;
77 Instance.logger.filterLogType = LogType.Warning;
79 Instance.logger.filterLogType = LogType.Error;
81 Instance.logger.filterLogType = LogType.Log;
85 private const string DEBUG =
"DEBUG";
87 private const string ERROR =
"ERROR";
89 private const string INFO =
"INFO";
91 private const string VERBOSE =
"VERBOSE";
93 private const string WARN =
"WARN";
113 public static void Debug(
string m, params
object[] list)
117 log(LogType.Log, DEBUG, m, list);
127 public static void Error(
string m, params
object[] list)
131 log(LogType.Error, ERROR, m, list);
140 public static void Info(
string m, params
object[] list)
144 log(LogType.Log, INFO, m, list);
153 public static void Verbose(
string m, params
object[] list)
157 log(LogType.Log, VERBOSE, m, list);
166 public static void Warn(
string m, params
object[] list)
170 log(LogType.Warning, WARN, m, list);
181 private static void log(LogType logType,
string tag,
string m, params
object[] list)
183 Instance.logger.Log(logType, tag,
string.Format(
"[{0}]\n{1}",
TAG,
string.Format(m, list)));
static void Debug(string m, params object[] list)
DEBUG logging function call.
static void Warn(string m, params object[] list)
WARN logging function call.
static void Verbose(string m, params object[] list)
VERBOSE logging function call.
static void Info(string m, params object[] list)
INFO logging function call.
const int DISABLED
DISABLED logging level as an int.
const int ERROR_LEVEL
ERROR logging level as an int.
const int INFO_LEVEL
INFO logging level as an int.
static void Error(string m, params object[] list)
ERROR logging function call.
const int WARN_LEVEL
WARN logging level as an int.
const int VERBOSE_LEVEL
VERBOSE logging level as an int.
static int LogLevel
Gets or sets the logging level.
const int DEBUG_LEVEL
DEBUG logging level as an int.
static string TAG
Gets or sets the logging tag.