rotatory_open()
#
rotatory_open()
initializes and opens a rotatory log file with the specified parameters, creating necessary directories if required.
Prototype
hrotatory_h rotatory_open(
const char *path,
size_t bf_size,
size_t max_megas_rotatoryfile_size,
size_t min_free_disk_percentage,
int xpermission,
int rpermission,
BOOL exit_on_fail
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The file path for the rotatory log. |
|
|
The buffer size for writing logs; |
|
|
The maximum size of a rotatory log file in megabytes; |
|
|
The minimum free disk space percentage before stopping logging; |
|
|
The permission mode for directories and executable files. |
|
|
The permission mode for regular log files. |
|
|
If |
Return Value
Returns a handle to the rotatory log (hrotatory_h
) on success, or NULL
on failure.
Notes
If the specified log directory does not exist, rotatory_open()
attempts to create it.
If the log file does not exist, rotatory_open()
creates a new one with the specified permissions.
Use rotatory_close()
to properly close the log handle.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples