NAME
gcl_flags
- Logging flags.
SYNOPSIS
#include <game-carrier/common.h>
enum gcl_flags {
GCL_TO_STDERR = (1 << 0),
GCL_PRINT_THREAD_ID = (1 << 1),
GCL_AUTO_FLUSH = (1 << 2),
GCL_APPEND = (1 << 3),
GCL_STANDARD_FLAGS = GCL_TO_STDERR | GCL_PRINT_THREAD_ID | GCL_AUTO_FLUSH,
GCL_FLAG_COUNT = 4
};
DESCRIPTION
The gcl_flags
enum is used to set the logging flags.
It is utilized as flags in the gc_log_setopt
API function to configure logging behavior.
Name | Value | Description |
---|---|---|
GCL_TO_STDERR |
0x0001 |
Outputs log messages to the stderr stream. |
GCL_PRINT_THREAD_ID |
0x0002 |
Adds a thread ID to a log message. |
GCL_AUTO_FLUSH |
0x0004 |
Allows writing changes to the log file immediately after each invocation. This flag affects performance, but when the program crashes, all details are saved to the log file. |
GCL_APPEND |
0x0008 |
This flag is used to preserve a log file between runs. New log messages will be appended to the end of the existing file. |
GCL_STANDARD_FLAGS |
GCL_TO_STDERR | GCL_PRINT_THREAD_ID | GCL_AUTO_FLUSH |
Combination of standard logging flags. |
GCL_FLAG_COUNT |
4 | The total number of available flags. |