Logger: Drop unused gLogEarly
Change-Id: I2c8f24fbf453e0a94d7a95c3df7cc75f0e4bd456
This commit is contained in:
parent
b7095c7bc5
commit
bd45a979f8
|
@ -214,37 +214,4 @@ void gLogInit(const char* name, const char* level, int facility, char* fn)
|
||||||
openlog(name,0,facility);
|
openlog(name,0,facility);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void gLogEarly(int level, const char *fmt, ...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
|
||||||
|
|
||||||
if (gLogToSyslog) {
|
|
||||||
va_list args_copy;
|
|
||||||
va_copy(args_copy, args);
|
|
||||||
vsyslog(level | LOG_USER, fmt, args_copy);
|
|
||||||
va_end(args_copy);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gLogToConsole) {
|
|
||||||
va_list args_copy;
|
|
||||||
va_copy(args_copy, args);
|
|
||||||
vprintf(fmt, args_copy);
|
|
||||||
printf("\n");
|
|
||||||
va_end(args_copy);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gLogToFile) {
|
|
||||||
va_list args_copy;
|
|
||||||
va_copy(args_copy, args);
|
|
||||||
vfprintf(gLogToFile, fmt, args_copy);
|
|
||||||
fprintf(gLogToFile, "\n");
|
|
||||||
va_end(args_copy);
|
|
||||||
}
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim: ts=4 sw=4
|
// vim: ts=4 sw=4
|
||||||
|
|
|
@ -131,8 +131,6 @@ std::ostream& operator<<(std::ostream& os, std::ostringstream& ss);
|
||||||
//@{
|
//@{
|
||||||
/** Initialize the global logging system. */
|
/** Initialize the global logging system. */
|
||||||
void gLogInit(const char* name, const char* level=NULL, int facility=LOG_USER, char* fn=NULL);
|
void gLogInit(const char* name, const char* level=NULL, int facility=LOG_USER, char* fn=NULL);
|
||||||
/** Allow early logging when still in constructors */
|
|
||||||
void gLogEarly(int level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue