When using libunshield, it would be nice to customize where logs get printed to eg. file, logger. This would allow better control of logging and less clutter in stderr when running unshield as a library inside of an application.
I'm thinking something like
libunshield.h
+typedef void (*UnshieldLogCallback)(void* userdata, int level, const char* file, int line, const char* format, ...);
void unshield_set_log_level(int level);
+void unshield_set_log_handler(UnshieldLogCallback* handler);
+// The contents of current log.h
The current _unshield_log function would become the default handler and unshield_log would be made to forward calls to the current handler.
When using libunshield, it would be nice to customize where logs get printed to eg. file, logger. This would allow better control of logging and less clutter in stderr when running unshield as a library inside of an application.
I'm thinking something like
The current
_unshield_log
function would become the default handler andunshield_log
would be made to forward calls to the current handler.