Backbone - Logger
 
Loading...
Searching...
No Matches
Backbone Namespace Reference

Classes

class  LoggerConfig
 ScriptableObject configuration for the Logger. Allows setting default categories, their colors, and global log level directly from the Unity Inspector. More...
 
class  LoggerConfigEditor
 Custom inspector for LoggerConfig. More...
 
class  LoggerManager
 LoggerManager is responsible for applying the settings from a single LoggerConfig instance at runtime. More...
 
class  TestLogger
 Demonstrates a visually appealing test for the Logger system. Generates a colorful log to showcase categories and levels. More...
 

Enumerations

enum  LoggerColorMode { NoColor , CategoryOnly , FullMessage }
 Defines which parts of the log line will be colored. More...
 

Functions

static void AddCategory (string category, bool active=true, Color? color=null)
 Adds or updates a category in the logger system.
 
static void SetCategoryActive (string category, bool isActive)
 Enables or disables a specific category at runtime.
 
static bool IsCategoryActive (string category)
 Checks whether a category is active.
 
static void Log (string message, LogLevel level=LogLevel.Info, string category="General")
 Logs a message with the specified severity and category.
 

Variables

enum Backbone::LoggerColorMode Debug
 Severity levels for logging messages.
 
enum Backbone::LoggerColorMode Info
 General informational messages.
 
enum Backbone::LoggerColorMode Warning
 Indicates a potential problem or unexpected situation.
 
enum Backbone::LoggerColorMode Error
 Indicates a recoverable error or serious issue.
 
enum Backbone::LoggerColorMode Critical
 Indicates a critical error that may cause the application to fail.
 
enum Backbone::LoggerColorMode GlobalLevel = LogLevel.Debug
 No logs will be displayed at all.
 
static LoggerColorMode ColorMode = LoggerColorMode.CategoryOnly
 Current color mode for log output.
 
static Dictionary< string,(bool active, Color color)> categories
 Stores categories with their active state and display color.
 

Enumeration Type Documentation

◆ LoggerColorMode

Defines which parts of the log line will be colored.

Enumerator
NoColor 

Do not use any color at all.

CategoryOnly 

Only the category will be colored.

FullMessage 

The header and the message text will both be colored.

Function Documentation

◆ AddCategory()

static void Backbone::AddCategory ( string category,
bool active = true,
Color? color = null )
static

Adds or updates a category in the logger system.

Parameters
categoryCategory name.
activeWhether the category is enabled.
colorThe display color for this category in the Unity console.

◆ IsCategoryActive()

static bool Backbone::IsCategoryActive ( string category)
static

Checks whether a category is active.

Parameters
categoryThe category name.
Returns
True if the category is active, false otherwise.

◆ Log()

static void Backbone::Log ( string message,
LogLevel level = LogLevel.Info,
string category = "General" )
static

Logs a message with the specified severity and category.

Parameters
messageThe message to log.
levelThe severity level.
categoryThe category name.

◆ SetCategoryActive()

static void Backbone::SetCategoryActive ( string category,
bool isActive )
static

Enables or disables a specific category at runtime.

Parameters
categoryThe category name.
isActiveTrue to enable, false to disable.

Variable Documentation

◆ categories

Dictionary<string, (bool active, Color color)> Backbone::categories
staticprivate
Initial value:
=
new Dictionary<string, (bool active, Color color)>()

Stores categories with their active state and display color.

◆ ColorMode

LoggerColorMode Backbone::ColorMode = LoggerColorMode.CategoryOnly
static

Current color mode for log output.

◆ Critical

enum Backbone::LoggerColorMode Backbone::Critical

Indicates a critical error that may cause the application to fail.

◆ Debug

enum Backbone::LoggerColorMode Backbone::Debug

Severity levels for logging messages.

Used for detailed debugging information.

◆ Error

enum Backbone::LoggerColorMode Backbone::Error

Indicates a recoverable error or serious issue.

◆ GlobalLevel

enum Backbone::LoggerColorMode Backbone::GlobalLevel = LogLevel.Debug

No logs will be displayed at all.

Central logging system for Unity with dynamic categories, severity levels, and per-category colors.

Global minimum log level that will be displayed.

◆ Info

enum Backbone::LoggerColorMode Backbone::Info

General informational messages.

◆ Warning

enum Backbone::LoggerColorMode Backbone::Warning

Indicates a potential problem or unexpected situation.