Add syslog support.
This commit is contained in:
parent
e97cd98f90
commit
faf793b0aa
5 changed files with 36 additions and 8 deletions
|
@ -22,19 +22,26 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
|
||||
#include "log/SysLog.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
SysLog::SysLog()
|
||||
{
|
||||
openlog(APP_ID, LOG_PID, LOG_USER);
|
||||
}
|
||||
|
||||
|
||||
void SysLog::message(int level, const char* fmt, va_list args)
|
||||
void SysLog::message(int level, const char *fmt, va_list args)
|
||||
{
|
||||
vsyslog(level, fmt, args);
|
||||
}
|
||||
|
||||
|
||||
void SysLog::text(const char* fmt, va_list args)
|
||||
void SysLog::text(const char *fmt, va_list args)
|
||||
{
|
||||
message(LOG_INFO, fmt, args);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue