Make shadow_logfd and Prog not extern
Closes #444 Closes #465 Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
28
lib/shadowlog.c
Normal file
28
lib/shadowlog.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include "shadowlog.h"
|
||||
|
||||
#include "lib/shadowlog_internal.h"
|
||||
|
||||
void log_set_progname(const char *progname)
|
||||
{
|
||||
Prog = progname;
|
||||
}
|
||||
|
||||
const char *log_get_progname(void)
|
||||
{
|
||||
return Prog;
|
||||
}
|
||||
|
||||
void log_set_logfd(FILE *fd)
|
||||
{
|
||||
if (NULL != fd)
|
||||
shadow_logfd = fd;
|
||||
else
|
||||
shadow_logfd = stderr;
|
||||
}
|
||||
|
||||
FILE *log_get_logfd(void)
|
||||
{
|
||||
if (shadow_logfd != NULL)
|
||||
return shadow_logfd;
|
||||
return stderr;
|
||||
}
|
Reference in New Issue
Block a user