logging: rename tgt_stdout to tgt_file

This commit is contained in:
Harald Welte 2010-08-25 14:55:44 +02:00
parent d4bb7ab66b
commit 0083cd381c
2 changed files with 6 additions and 6 deletions

View File

@ -84,7 +84,7 @@ struct log_target {
union { union {
struct { struct {
FILE *out; FILE *out;
} tgt_stdout; } tgt_file;
struct { struct {
int priority; int priority;

View File

@ -296,10 +296,10 @@ void log_set_category_filter(struct log_target *target, int category,
/* since C89/C99 says stderr is a macro, we can safely do this! */ /* since C89/C99 says stderr is a macro, we can safely do this! */
#ifdef stderr #ifdef stderr
static void _stderr_output(struct log_target *target, const char *log) static void _file_output(struct log_target *target, const char *log)
{ {
fprintf(target->tgt_stdout.out, "%s", log); fprintf(target->tgt_file.out, "%s", log);
fflush(target->tgt_stdout.out); fflush(target->tgt_file.out);
} }
#endif #endif
@ -340,8 +340,8 @@ struct log_target *log_target_create_stderr(void)
if (!target) if (!target)
return NULL; return NULL;
target->tgt_stdout.out = stderr; target->tgt_file.out = stderr;
target->output = _stderr_output; target->output = _file_output;
return target; return target;
#else #else
return NULL; return NULL;