A logger allocated with WLog_Get now can have a customized context by
setting it with WLog_SetContext. Along with the newly introduced format
specifier %ctx an additional field is printed for the context.
C11 atexit cleanup handler are used to call cleanup routines for WLog
and SSL on program termination. This removes false positives when using
ASAN runtime memory debugger
* Fixed format strings to match arguments
Reviewed and replaced all %d specifiers to match proper type
* Added proxy dynamic channel command type to log messages.
Since this function calls WLog_GetLogLevel anyway better only
export the API to allow internal checks to be modified in the
future without breaking API
leaked_storage: Variable "result" going out of scope leaks the storage it points to.
leaked_storage: Variable "bt" going out of scope leaks the storage it points to.
When using pthread_once with destructors they are only called,
if each thread (including the main thread) is exited with pthread_exit.
Introducing winpr_exit as a wrapper for that purpose.
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
win32/msvc cc does not recognize the %z format specifier which caused
invalid references and segfaults on win32.
Until FreeRDP gets format specifier macros we'll cast size_t to
unsigned long and use the %lu specifier.
Also simplified winpr_backtrace_symbols() a little bit and fixed it
to allocate the correct amount of bytes for the return buffer.
* only expose necessary functions and types in header
* don't expose appender internals
* add generic function WLog_ConfigureAppender to have the possibility
to configure appender specific settings
* detect appender availability if WLog_SetLogAppenderType or
WLog_Appender_New return FALSE or NULL respectively the appender isn't
available or the initialization failed. This is very useful for the
use with optional appenders.
* add Free to the appender interface. At the time of the Free the
appender is known and available so it can be called directly (instead
of calling the right function according to the type)
* make all appender internal function static
* all appenders return the generic wLogAppender type now. Typecasts
are internally done where necessary this abstracts the appenders more
cleanly
This appender allows to receive the logs over a network connection using UDP packets.
You can see the logs using a listening netcat, for example: nc -ul 127.0.0.1 20000.