rotatory_write()
#
rotatory_write()
writes a log message to the rotatory log file with the specified priority level.
Prototype
int rotatory_write(
hrotatory_h hr,
int priority,
const char* bf,
size_t len
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Handle to the rotatory log instance. |
|
|
Priority level of the log message, ranging from |
|
|
Pointer to the buffer containing the log message. |
|
|
Length of the log message in bytes. |
Return Value
Returns the number of bytes written on success, or -1
on error.
Notes
If priority
is LOG_AUDIT
, the message is written without a header.
If priority
is outside the valid range, it defaults to LOG_DEBUG
.
The function appends a newline character (\n
) to the log message.
Internally calls _rotatory()
to perform the actual writing.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples