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)

    static SysMutex *log_mutex = NULL;
    
    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

SysSetAbortCallback

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

Read More

SysAbort

SysAbort Description Custom abort function that can be redirected for testing purposes. By default, this calls the standard abort() function. If a callback is set via SysSetAbortCallback, it calls the callback instead.

Read More

SysTerminateProcess

SysTerminateProcess Description Terminate a running process forcefully.

Read More