Tilt Five™ Unity API  1.4.1
TiltFive.Logging.Log Class Reference

The Logger. More...

Inheritance diagram for TiltFive.Logging.Log:
TiltFive.Singleton< Log >

Static Public Member Functions

static void Debug (string m, params object[] list)
 DEBUG logging function call. More...
 
static void Error (string m, params object[] list)
 ERROR logging function call. More...
 
static void Info (string m, params object[] list)
 INFO logging function call. More...
 
static void Verbose (string m, params object[] list)
 VERBOSE logging function call. More...
 
static void Warn (string m, params object[] list)
 WARN logging function call. More...
 

Static Public Attributes

const int DEBUG_LEVEL = 1
 DEBUG logging level as an int. More...
 
const int ERROR_LEVEL = 4
 ERROR logging level as an int. More...
 
const int INFO_LEVEL = 2
 INFO logging level as an int. More...
 
const int VERBOSE_LEVEL = 0
 VERBOSE logging level as an int. More...
 
const int WARN_LEVEL = 3
 WARN logging level as an int. More...
 
const int DISABLED = 5
 DISABLED logging level as an int. More...
 

Properties

static string TAG [get, set]
 Gets or sets the logging tag. More...
 
static int LogLevel [get, set]
 Gets or sets the logging level. More...
 
- Properties inherited from TiltFive.Singleton< Log >
static T Instance [get]
 

Static Private Member Functions

static void log (LogType logType, string tag, string m, params object[] list)
 Universal log write function. More...
 

Private Attributes

ILogger logger = UnityEngine.Debug.unityLogger
 The logger instance. More...
 
string tag = "Tilt Five, Inc."
 The logging tag. More...
 
int level = VERBOSE_LEVEL
 The logging level. More...
 

Static Private Attributes

const string DEBUG = "DEBUG"
 DEBUG logging level as a string. More...
 
const string ERROR = "ERROR"
 ERROR logging level as a string. More...
 
const string INFO = "INFO"
 INFO logging level as a string. More...
 
const string VERBOSE = "VERBOSE"
 VERBOSE logging level as a string. More...
 
const string WARN = "WARN"
 WARN logging level as a string. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TiltFive.Singleton< Log >
 Singleton ()
 

Detailed Description

The Logger.

Definition at line 41 of file Log.cs.

Member Function Documentation

◆ Debug()

static void TiltFive.Logging.Log.Debug ( string  m,
params object[]  list 
)
static

DEBUG logging function call.

Parameters
mThe string message to log.
listOptional ist of input parameters to m , when following string.Format rules.

Definition at line 113 of file Log.cs.

114  {
115  if (DEBUG_LEVEL >= LogLevel)
116  {
117  log(LogType.Log, DEBUG, m, list);
118  }
119  }
static void log(LogType logType, string tag, string m, params object[] list)
Universal log write function.
Definition: Log.cs:181
const string DEBUG
DEBUG logging level as a string.
Definition: Log.cs:85
static int LogLevel
Gets or sets the logging level.
Definition: Log.cs:68
const int DEBUG_LEVEL
DEBUG logging level as an int.
Definition: Log.cs:96

References TiltFive.Logging.Log.DEBUG, TiltFive.Logging.Log.DEBUG_LEVEL, TiltFive.Logging.Log.log(), and TiltFive.Logging.Log.LogLevel.

◆ Error()

static void TiltFive.Logging.Log.Error ( string  m,
params object[]  list 
)
static

ERROR logging function call.

Parameters
mThe string message to log.
listOptional ist of input parameters to m , when following string.Format rules.

Definition at line 127 of file Log.cs.

128  {
129  if (ERROR_LEVEL >= LogLevel)
130  {
131  log(LogType.Error, ERROR, m, list);
132  }
133  }
const int ERROR_LEVEL
ERROR logging level as an int.
Definition: Log.cs:98
const string ERROR
ERROR logging level as a string.
Definition: Log.cs:87

References TiltFive.Logging.Log.ERROR, TiltFive.Logging.Log.ERROR_LEVEL, TiltFive.Logging.Log.log(), and TiltFive.Logging.Log.LogLevel.

Referenced by TiltFive.Display.Awake(), TiltFive.Display.GetDisplayDimensionsImpl(), TiltFive.Display.GetGlassesIPDImpl(), TiltFive.Wand.WandCore.GetLatestInputs(), TiltFive.SplitStereoCamera.Initialize(), TiltFive.SystemControl.IsTiltFiveUIRequestingAttention(), TiltFive.TiltFiveManager.NeedsDriverUpdate(), TiltFive.TiltFiveManager2.NeedsDriverUpdate(), TiltFive.TiltFiveManager.OnEnable(), TiltFive.TiltFiveManager2.OnEnable(), TiltFive.Display.PresentStereoImagesImpl(), TiltFive.TiltFiveManager.Quit(), TiltFive.TiltFiveManager2.Quit(), TiltFive.Glasses.GlassesCore.Reset(), TiltFive.CameraImage.CameraImageCore.TryCancelCameraImageBuffer(), TiltFive.Wand.WandCore.TryCheckConnected(), TiltFive.CameraImage.CameraImageCore.TryConfigureCameraImageStream(), TiltFive.CameraImage.CameraImageCore.TryGetFilledCameraImageBuffer(), TiltFive.Glasses.GlassesCore.TryGetFriendlyName(), TiltFive.GameBoard.TryGetGameboardDimensions(), TiltFive.GameBoard.TryGetGameboardExtents(), TiltFive.Glasses.BaseGlassesCore.TryGetStateFromPlugin(), TiltFive.Wand.TryGetWandAvailability(), TiltFive.Wand.TryScanForWands(), TiltFive.Wand.TrySendImpulse(), TiltFive.CameraImage.CameraImageCore.TrySubmitEmptyCameraImageBuffer(), TiltFive.Glasses.GlassesCore.Update(), TiltFive.TrackableCore< TSettings, TState >.Update(), and TiltFive.Wand.WandCore.Update().

◆ Info()

static void TiltFive.Logging.Log.Info ( string  m,
params object[]  list 
)
static

◆ log()

static void TiltFive.Logging.Log.log ( LogType  logType,
string  tag,
string  m,
params object[]  list 
)
staticprivate

Universal log write function.

Parameters
logTypeThe logging type.
tagThe logging tag.
mThe logging message.
listOptional ist of input parameters to m , when following string.Format rules.

Definition at line 181 of file Log.cs.

182  {
183  Instance.logger.Log(logType, tag, string.Format("[{0}]\n{1}", TAG, string.Format(m, list)));
184  }
string tag
The logging tag.
Definition: Log.cs:48
static string TAG
Gets or sets the logging tag.
Definition: Log.cs:58

References TiltFive.Singleton< Log >.Instance, TiltFive.Logging.Log.tag, and TiltFive.Logging.Log.TAG.

Referenced by TiltFive.Logging.Log.Debug(), TiltFive.Logging.Log.Error(), TiltFive.Logging.Log.Info(), TiltFive.Logging.Log.Verbose(), and TiltFive.Logging.Log.Warn().

◆ Verbose()

static void TiltFive.Logging.Log.Verbose ( string  m,
params object[]  list 
)
static

VERBOSE logging function call.

Parameters
mThe string message to log.
listOptional ist of input parameters to m , when following string.Format rules.

Definition at line 153 of file Log.cs.

154  {
155  if (VERBOSE_LEVEL >= LogLevel)
156  {
157  log(LogType.Log, VERBOSE, m, list);
158  }
159  }
const int VERBOSE_LEVEL
VERBOSE logging level as an int.
Definition: Log.cs:102
const string VERBOSE
VERBOSE logging level as a string.
Definition: Log.cs:91

References TiltFive.Logging.Log.log(), TiltFive.Logging.Log.LogLevel, TiltFive.Logging.Log.VERBOSE, and TiltFive.Logging.Log.VERBOSE_LEVEL.

◆ Warn()

static void TiltFive.Logging.Log.Warn ( string  m,
params object[]  list 
)
static

Member Data Documentation

◆ DEBUG

const string TiltFive.Logging.Log.DEBUG = "DEBUG"
staticprivate

DEBUG logging level as a string.

Definition at line 85 of file Log.cs.

Referenced by TiltFive.Logging.Log.Debug().

◆ DEBUG_LEVEL

const int TiltFive.Logging.Log.DEBUG_LEVEL = 1
static

DEBUG logging level as an int.

Definition at line 96 of file Log.cs.

Referenced by TiltFive.Logging.Log.Debug().

◆ DISABLED

const int TiltFive.Logging.Log.DISABLED = 5
static

DISABLED logging level as an int.

Definition at line 106 of file Log.cs.

◆ ERROR

const string TiltFive.Logging.Log.ERROR = "ERROR"
staticprivate

ERROR logging level as a string.

Definition at line 87 of file Log.cs.

Referenced by TiltFive.Logging.Log.Error().

◆ ERROR_LEVEL

const int TiltFive.Logging.Log.ERROR_LEVEL = 4
static

ERROR logging level as an int.

Definition at line 98 of file Log.cs.

Referenced by TiltFive.Logging.Log.Error().

◆ INFO

const string TiltFive.Logging.Log.INFO = "INFO"
staticprivate

INFO logging level as a string.

Definition at line 89 of file Log.cs.

Referenced by TiltFive.Logging.Log.Info().

◆ INFO_LEVEL

const int TiltFive.Logging.Log.INFO_LEVEL = 2
static

INFO logging level as an int.

Definition at line 100 of file Log.cs.

Referenced by TiltFive.Logging.Log.Info().

◆ level

int TiltFive.Logging.Log.level = VERBOSE_LEVEL
private

The logging level.

Definition at line 51 of file Log.cs.

◆ logger

ILogger TiltFive.Logging.Log.logger = UnityEngine.Debug.unityLogger
private

The logger instance.

Definition at line 45 of file Log.cs.

◆ tag

string TiltFive.Logging.Log.tag = "Tilt Five, Inc."
private

The logging tag.

Definition at line 48 of file Log.cs.

Referenced by TiltFive.Logging.Log.log().

◆ VERBOSE

const string TiltFive.Logging.Log.VERBOSE = "VERBOSE"
staticprivate

VERBOSE logging level as a string.

Definition at line 91 of file Log.cs.

Referenced by TiltFive.Logging.Log.Verbose().

◆ VERBOSE_LEVEL

const int TiltFive.Logging.Log.VERBOSE_LEVEL = 0
static

VERBOSE logging level as an int.

Definition at line 102 of file Log.cs.

Referenced by TiltFive.Logging.Log.Verbose().

◆ WARN

const string TiltFive.Logging.Log.WARN = "WARN"
staticprivate

WARN logging level as a string.

Definition at line 93 of file Log.cs.

Referenced by TiltFive.Logging.Log.Warn().

◆ WARN_LEVEL

const int TiltFive.Logging.Log.WARN_LEVEL = 3
static

WARN logging level as an int.

Definition at line 104 of file Log.cs.

Referenced by TiltFive.Logging.Log.Warn().

Property Documentation

◆ LogLevel

int TiltFive.Logging.Log.LogLevel
staticgetset

Gets or sets the logging level.

The log level.

Definition at line 67 of file Log.cs.

68  {
69  get => Instance.level;
70  set
71  {
72  Instance.level = value;
73 
74  if (INFO_LEVEL <= value)
75  Instance.logger.filterLogType = LogType.Log;
76  else if (WARN_LEVEL == value)
77  Instance.logger.filterLogType = LogType.Warning;
78  else if (ERROR_LEVEL == value)
79  Instance.logger.filterLogType = LogType.Error;
80  else
81  Instance.logger.filterLogType = LogType.Log;
82  }
83  }

Referenced by TiltFive.TiltFiveManager.Awake(), TiltFive.TiltFiveManager2.Awake(), TiltFive.Logging.Log.Debug(), TiltFive.Logging.Log.Error(), TiltFive.Logging.Log.Info(), TiltFive.Logging.Log.Verbose(), and TiltFive.Logging.Log.Warn().

◆ TAG

string TiltFive.Logging.Log.TAG
staticgetset

Gets or sets the logging tag.

The tag.

Definition at line 57 of file Log.cs.

58  {
59  get => Instance.tag;
60  set => Instance.tag = value;
61  }

Referenced by TiltFive.TiltFiveManager.Awake(), TiltFive.TiltFiveManager2.Awake(), and TiltFive.Logging.Log.log().


The documentation for this class was generated from the following file: