Sylvain patch #2, with modifications:
CommonLibs: Avoid direct syslog calls in ConfigurationTable
We instead introduce a 'log early' facility in Logger.h to accomplish
the same
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
I added similar code to the reporting functions, which did not exist when sylvain made this patch
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4629 19bc5d8c-e614-43d4-8b26-e1612bc8e597
diff --git a/CommonLibs/Logger.h b/CommonLibs/Logger.h
index 35101d8..0a9b535 100644
--- a/CommonLibs/Logger.h
+++ b/CommonLibs/Logger.h
@@ -102,6 +102,8 @@
void gLogInit(const char* name, const char* level=NULL, int facility=LOG_USER);
/** Get the logging level associated with a given file. */
int gGetLoggingLevel(const char *filename=NULL);
+/** Allow early logging when still in constructors */
+void gLogEarly(int level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
//@}