LogInit

Table of Contents

LogInit

Description

Initialize logging subsystem

Note

Is lazily called if not called by user at start of program.

Parameters

NameDirectionDescription
redirectinWhen true, redirect output to temporary file

Success

Logging system ready for use

Failure

Logging remains uninitialized (will lazy-init later)

Usage example (Cross-references)

    }
    
    void LogInit(bool redirect) {
    if (redirect) {
    // Get the current time
    // Initialize log if not already
    if (!stderror) {
    LogInit(false);
    }
    
    int main(int argc, char **argv) {
    LogInit(false);
    
    if (argc < 2 || argc > 3) {
    }
    
    LogInit(false);
    
    const char *config_path = argv[1];

Share :

Related Posts

LOG_SYS_FATAL

LOG_SYS_FATAL Description Writes a fatal log message and aborts the program, with errno explanation appended at the end of final string.

Read More

SysSetAbortCallback

SysSetAbortCallback Description Set a custom callback function for SysAbort. If no callback is set, SysAbort will call the standard abort() function.

Read More

LOG_FATAL

LOG_FATAL Description Writes a fatal log message and aborts the program. …[in] : Format string and arguments following printf-style syntax.

Read More