blob: 7ec8efe9b3fa33436f684e0ea4dcd06ed3505bdc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "logs.h"
int bbs_log( const char *syslname )
{
int ret;
char *term=NULL;
setlogmask (LOG_UPTO (LOG_NOTICE));
if ( syslname == NULL )
{
openlog ( BBS_DEFAULT_SYSLOG, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
} else
{
openlog ( syslname, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1 );
}
term = getenv( "TERM" );
if ( term != NULL )
syslog (LOG_NOTICE, "BBS visitor with TERM=%s", term);
else
syslog( LOG_NOTICE, "BBS visitor" );
closelog ();
return ret;
}
|