#include <stdio.h>
#include <syslog.h>
#include <libintl.h>
Go to the source code of this file.
| #define _ |
( |
|
string | ) |
gettext(string) |
◆ _OUTPUT_GET_CURRENT_VALUE
| #define _OUTPUT_GET_CURRENT_VALUE 127 |
◆ _OUTPUT_MODE_FILE
| #define _OUTPUT_MODE_FILE 4 |
◆ _OUTPUT_MODE_PRINT
| #define _OUTPUT_MODE_PRINT 1 |
Print messages to stdout.
Definition at line 48 of file output.h.
◆ _OUTPUT_MODE_SYSLOG
| #define _OUTPUT_MODE_SYSLOG 2 |
Print messages to syslog.
Definition at line 49 of file output.h.
◆ debug
| #define debug |
( |
|
... | ) |
emptyfunc() |
◆ error
| #define error |
( |
|
... | ) |
output(LOG_ERR, __VA_ARGS__) |
◆ LOG_ALERT_NAME
| #define LOG_ALERT_NAME "ALERT" |
◆ LOG_CRIT_NAME
| #define LOG_CRIT_NAME "CRIT" |
◆ LOG_DEBUG_NAME
| #define LOG_DEBUG_NAME "DEBUG" |
◆ LOG_EMERG_NAME
| #define LOG_EMERG_NAME "PANIC" |
◆ LOG_ERR_NAME
| #define LOG_ERR_NAME "ERROR" |
◆ LOG_ERROR
| #define LOG_ERROR LOG_ERR |
◆ LOG_INFO_NAME
| #define LOG_INFO_NAME "INFO" |
◆ LOG_NOTICE_NAME
| #define LOG_NOTICE_NAME "NOTICE" |
◆ LOG_WARNING_NAME
| #define LOG_WARNING_NAME "WARN" |
◆ output
◆ output1()
| void output1 |
( |
int |
lvl, |
|
|
const char * |
msg, |
|
|
|
... |
|
) |
| |
Sent a formatted string to the output function with a level.
- Parameters
-
| [in] | lvl | Message output level. |
| [in] | msg | Pointer to the message, this may be a formatted message. |
| [in] | ... | Additional variable to substitute in message. |
◆ set_output_file()
| int set_output_file |
( |
FILE * |
out | ) |
|
Set the output file (do not forget to call set_output_mode with at least _OUTPUT_MODE_FILE also).
- Parameters
-
- Returns
- return value
Definition at line 45 of file output.c.
◆ set_output_level()
| int set_output_level |
( |
int |
lvl | ) |
|
Set the output level, calls to output with a higher value (less important) are ignored.
- Parameters
-
| [in] | lvl | The desired level. |
- Returns
- The new level.
Definition at line 24 of file output.c.
◆ set_output_mode()
| int set_output_mode |
( |
int |
mode | ) |
|
Set the output mode for following output calls, the mode can be one or more of:
Definition at line 33 of file output.c.