Assorted static "helper" functions pertaining to log outputs.
More...
|
static string | FormatMessage (string msg, int contextDepth=-1) |
| Formats a given message as it would appear in the log output. More...
|
|
static void | Info (string msg="") |
| Outputs a plain log message without added fluff (wraps Mod.Logger.Info(...) ). More...
|
|
static void | Info (Mod mod, string msg="") |
| Outputs a plain log message without added fluff (wraps Mod.Logger.Info(...) ). More...
|
|
static void | Log (string msg="") |
| Outputs a plain log message. More...
|
|
static void | Alert (string msg="") |
| Outputs an "alert" log message (TML considers it an error-type message). More...
|
|
static void | Warn (string msg="") |
| Outputs a warning log message (TML considers it a fatal-type message). More...
|
|
static void | LogContext (string msg, bool omitNamespace=true, int max=-1, string separator="\n", string spacer=" ") |
| Outputs a log message indicating the current context. More...
|
|
static void | LogOnce (string msg) |
| Outputs a plain log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | AlertOnce (string msg="") |
| Outputs an "alert" log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | WarnOnce (string msg="") |
| Outputs a "warning" log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | LogAndPrintOnce (string msg, Color? color=null) |
| Outputs a plain log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | AlertAndPrintOnce (string msg="", Color? color=null) |
| Outputs an "alert" log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | WarnAndPrintOnce (string msg="", Color? color=null) |
| Outputs a "warning" log message "once" (or rather, once every log10 % 1 == 0 times). More...
|
|
static void | ResetOnceMessage (string msg) |
| Resets a given "once" log, alert, or warn messages. More...
|
|
|
static string | Context |
| Formats a given message as it would appear in the log output. More...
|
|
Assorted static "helper" functions pertaining to log outputs.
Definition at line 11 of file LogHelpers.cs.
◆ Alert()
static void HamstarHelpers.Helpers.Debug.LogHelpers.Alert |
( |
string |
msg = "" | ) |
|
|
static |
Outputs an "alert" log message (TML considers it an error-type message).
- Parameters
-
Definition at line 133 of file LogHelpers.cs.
◆ AlertAndPrintOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.AlertAndPrintOnce |
( |
string |
msg = "" , |
|
|
Color? |
color = null |
|
) |
| |
|
static |
Outputs an "alert" log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 108 of file LogHelpers_Once.cs.
◆ AlertOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.AlertOnce |
( |
string |
msg = "" | ) |
|
|
static |
Outputs an "alert" log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 57 of file LogHelpers_Once.cs.
◆ FormatMessage()
static string HamstarHelpers.Helpers.Debug.LogHelpers.FormatMessage |
( |
string |
msg, |
|
|
int |
contextDepth = -1 |
|
) |
| |
|
static |
Formats a given message as it would appear in the log output.
- Parameters
-
msg | |
contextDepth | Indicates whether to also output the callstack context at the specified depth. No output if -1 is set. |
- Returns
Definition at line 19 of file LogHelpers.cs.
◆ Info() [1/2]
static void HamstarHelpers.Helpers.Debug.LogHelpers.Info |
( |
string |
msg = "" | ) |
|
|
static |
Outputs a plain log message without added fluff (wraps Mod.Logger.Info(...)
).
- Parameters
-
Definition at line 104 of file LogHelpers.cs.
◆ Info() [2/2]
static void HamstarHelpers.Helpers.Debug.LogHelpers.Info |
( |
Mod |
mod, |
|
|
string |
msg = "" |
|
) |
| |
|
static |
Outputs a plain log message without added fluff (wraps Mod.Logger.Info(...)
).
- Parameters
-
Definition at line 113 of file LogHelpers.cs.
◆ Log()
static void HamstarHelpers.Helpers.Debug.LogHelpers.Log |
( |
string |
msg = "" | ) |
|
|
static |
Outputs a plain log message.
- Parameters
-
Definition at line 121 of file LogHelpers.cs.
◆ LogAndPrintOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.LogAndPrintOnce |
( |
string |
msg, |
|
|
Color? |
color = null |
|
) |
| |
|
static |
Outputs a plain log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 96 of file LogHelpers_Once.cs.
◆ LogContext()
static void HamstarHelpers.Helpers.Debug.LogHelpers.LogContext |
( |
string |
msg, |
|
|
bool |
omitNamespace = true , |
|
|
int |
max = -1 , |
|
|
string |
separator = "\n" , |
|
|
string |
spacer = " " |
|
) |
| |
|
static |
Outputs a log message indicating the current context.
- Parameters
-
msg | |
omitNamespace | |
max | |
separator | |
spacer | |
Definition at line 170 of file LogHelpers.cs.
◆ LogOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.LogOnce |
( |
string |
msg | ) |
|
|
static |
Outputs a plain log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 47 of file LogHelpers_Once.cs.
◆ ResetOnceMessage()
static void HamstarHelpers.Helpers.Debug.LogHelpers.ResetOnceMessage |
( |
string |
msg | ) |
|
|
static |
Resets a given "once" log, alert, or warn messages.
- Parameters
-
Definition at line 150 of file LogHelpers_Once.cs.
◆ Warn()
static void HamstarHelpers.Helpers.Debug.LogHelpers.Warn |
( |
string |
msg = "" | ) |
|
|
static |
Outputs a warning log message (TML considers it a fatal-type message).
- Parameters
-
Definition at line 148 of file LogHelpers.cs.
◆ WarnAndPrintOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.WarnAndPrintOnce |
( |
string |
msg = "" , |
|
|
Color? |
color = null |
|
) |
| |
|
static |
Outputs a "warning" log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 128 of file LogHelpers_Once.cs.
◆ WarnOnce()
static void HamstarHelpers.Helpers.Debug.LogHelpers.WarnOnce |
( |
string |
msg = "" | ) |
|
|
static |
Outputs a "warning" log message "once" (or rather, once every log10 % 1 == 0 times).
- Parameters
-
Definition at line 75 of file LogHelpers_Once.cs.
◆ Context
string HamstarHelpers.Helpers.Debug.LogHelpers.Context |
|
static |
Formats a given message as it would appear in the log output.
- Parameters
-
msg | |
contextDepth | Indicates whether to also output the callstack context at the specified depth. No output if -1 is set. |
- Returns
- Calling context, global info, and full (chained together) output.
Definition at line 30 of file LogHelpers.cs.
The documentation for this class was generated from the following files: