VCV Rack API v2
Loading...
Searching...
No Matches
rack::logger Namespace Reference

Logs messages to a file or the terminal. More...

Enumerations

enum  Level { DEBUG_LEVEL , INFO_LEVEL , WARN_LEVEL , FATAL_LEVEL }
 

Functions

PRIVATE bool init ()
 Returns whether logger was successfully initialized.
 
PRIVATE void destroy ()
 
 __attribute__ ((format(printf, 5, 6))) void log(Level level
 Do not use this function directly.
 
const char int const char const char PRIVATE bool wasTruncated ()
 Returns whether the last log file failed to end properly, due to a possible crash.
 

Variables

std::string logPath
 
const char * filename
 
const char int line
 
const char int const char * func
 
const char int const char const char * format
 

Detailed Description

Logs messages to a file or the terminal.

Enumeration Type Documentation

◆ Level

Enumerator
DEBUG_LEVEL 
INFO_LEVEL 
WARN_LEVEL 
FATAL_LEVEL 

Function Documentation

◆ init()

PRIVATE bool rack::logger::init ( )

Returns whether logger was successfully initialized.

◆ destroy()

PRIVATE void rack::logger::destroy ( )

◆ __attribute__()

rack::logger::__attribute__ ( (format(printf, 5, 6)) )

Do not use this function directly.

Use the macros above. Thread-safe, meaning messages cannot overlap each other in the log.

◆ wasTruncated()

const char int const char const char PRIVATE bool rack::logger::wasTruncated ( )

Returns whether the last log file failed to end properly, due to a possible crash.

Variable Documentation

◆ logPath

std::string rack::logger::logPath
extern

◆ filename

const char* rack::logger::filename

◆ line

const char int rack::logger::line

◆ func

const char int const char* rack::logger::func

◆ format

const char int const char const char* rack::logger::format