libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
LogConfig Struct Reference

Full runtime configuration for the Logger. More...

#include <Logger.h>

Public Attributes

LogMode mode = LogMode::File
 Which backend(s) receive log lines; see LogMode.
 
LogLevel level = LogLevel::Info
 Minimum severity that is logged.
 
uint32_t multiBackendMask = LOGGER_OSREPORT
 Only consulted when mode == LogMode::Multi.
 
bool mirrorToOSReport = true
 Regardless of mode/multiBackendMask, also mirror every line to the console OS default backend (OSReport/SYS_Report) if one is registered.
 
const char * targetIp = "192.168.1.100"
 Destination IPv4 address for the UDP backend.
 
uint16_t targetPort = 4405
 Destination UDP port for the UDP backend.
 
bool nonBlocking = true
 socket is always created non-blocking; kept for clarity/future use
 
int geckoChannel = 1
 EXI channel (GC/Wii): 0 = memory card slot A, 1 = memory card slot B (where a USB Gecko is normally inserted).
 
uint32_t serialBaudRate = 115200
 Informational only on GC/Wii (EXI has a fixed protocol rate); used as the requested baud rate for a Wii U USB-to-TTL/USBSerialLogger backend, if one is registered.
 
char filePath [1024] = "sd:/debug.log"
 Path of the log file for the file backend. Each platform's init() points this at debug.log on the first mounted device.
 
LogFlushPolicy flushPolicy = LogFlushPolicy::Immediate
 How often the file backend flushes to storage.
 
uint32_t flushEveryNWrites = 16
 Flush interval in writes; only used when flushPolicy is LogFlushPolicy::EveryNWrites.
 
bool includeLevelTag = true
 prefix each line with "[DEBUG] "/"[INFO] "/etc.
 
bool includeSequenceNumber = false
 prefix each line with a monotonic call counter, useful for spotting dropped UDP packets
 
bool includeTimestamp = true
 prefix each line with the time since process start as "[secs.millis]"
 

Detailed Description

Full runtime configuration for the Logger.

Nothing backend-specific is ever hardcoded in a backend implementation - it all comes from here, supplied by app code (or left at these defaults, which are deliberately safe: log to a file on the first mounted device, mirrored to the console debug output; nothing that touches the network or external hardware).

Definition at line 100 of file Logger.h.

Member Data Documentation

◆ filePath

char LogConfig::filePath[1024] = "sd:/debug.log"

Path of the log file for the file backend. Each platform's init() points this at debug.log on the first mounted device.

Definition at line 134 of file Logger.h.

◆ flushEveryNWrites

uint32_t LogConfig::flushEveryNWrites = 16

Flush interval in writes; only used when flushPolicy is LogFlushPolicy::EveryNWrites.

Definition at line 138 of file Logger.h.

◆ flushPolicy

LogFlushPolicy LogConfig::flushPolicy = LogFlushPolicy::Immediate

How often the file backend flushes to storage.

Definition at line 136 of file Logger.h.

◆ geckoChannel

int LogConfig::geckoChannel = 1

EXI channel (GC/Wii): 0 = memory card slot A, 1 = memory card slot B (where a USB Gecko is normally inserted).

Ignored on Wii U.

Definition at line 125 of file Logger.h.

◆ includeLevelTag

bool LogConfig::includeLevelTag = true

prefix each line with "[DEBUG] "/"[INFO] "/etc.

Definition at line 141 of file Logger.h.

◆ includeSequenceNumber

bool LogConfig::includeSequenceNumber = false

prefix each line with a monotonic call counter, useful for spotting dropped UDP packets

Definition at line 142 of file Logger.h.

◆ includeTimestamp

bool LogConfig::includeTimestamp = true

prefix each line with the time since process start as "[secs.millis]"

Definition at line 143 of file Logger.h.

◆ level

LogLevel LogConfig::level = LogLevel::Info

Minimum severity that is logged.

Definition at line 103 of file Logger.h.

◆ mirrorToOSReport

bool LogConfig::mirrorToOSReport = true

Regardless of mode/multiBackendMask, also mirror every line to the console OS default backend (OSReport/SYS_Report) if one is registered.

This is what makes the framework "just work" under an emulator (Cemu/Dolphin capture stdout) with zero configuration.

Definition at line 113 of file Logger.h.

◆ mode

LogMode LogConfig::mode = LogMode::File

Which backend(s) receive log lines; see LogMode.

Definition at line 102 of file Logger.h.

◆ multiBackendMask

uint32_t LogConfig::multiBackendMask = LOGGER_OSREPORT

Only consulted when mode == LogMode::Multi.

OR LOGGER_* flags together, e.g. LOGGER_UDP | LOGGER_FILE.

Definition at line 107 of file Logger.h.

◆ nonBlocking

bool LogConfig::nonBlocking = true

socket is always created non-blocking; kept for clarity/future use

Definition at line 120 of file Logger.h.

◆ serialBaudRate

uint32_t LogConfig::serialBaudRate = 115200

Informational only on GC/Wii (EXI has a fixed protocol rate); used as the requested baud rate for a Wii U USB-to-TTL/USBSerialLogger backend, if one is registered.

Definition at line 130 of file Logger.h.

◆ targetIp

const char* LogConfig::targetIp = "192.168.1.100"

Destination IPv4 address for the UDP backend.

Definition at line 117 of file Logger.h.

◆ targetPort

uint16_t LogConfig::targetPort = 4405

Destination UDP port for the UDP backend.

Definition at line 119 of file Logger.h.


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