You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: I checked and the directory exists
I found out that what causes it to crash is this: slg_cfg.nFlags = 1;
If I remove that line it runs but doesn't output anything to the file
The text was updated successfully, but these errors were encountered:
This is not an issue. According to your copy, this is an expected result and I will tell you why.
slog_config_t structure has more fields than you are initializing in this example,
so some of the fields are not initialized while you are calling slog_config_set() function.
To fix this problem, you should call slog_config_get() function, which will initialize and fill
all the slog_config_t structure variables from the current configuration and then you can assign
only those parameters which you want to change and set the configuration with slog_config_set().
Please also note that parameter 1 for nFlags is not a valid value,
You can use SLOG_FLAGS_ALL to enable all the logging flags,
or just elect only needed flags like:
When initializing slog after I try to log once it fails with segmentation fault.
Here is the code below:
NOTE: I checked and the directory exists
I found out that what causes it to crash is this: slg_cfg.nFlags = 1;
If I remove that line it runs but doesn't output anything to the file
The text was updated successfully, but these errors were encountered: