Commit Graph

29 Commits

Author SHA1 Message Date
Armin Novak
6ed50b4b1d Refactored WinPR includes 2022-03-03 11:26:48 +01:00
akallabeth
c25d15d1d6 Initialize WLog prefix string buffers '\0' 2022-02-28 16:49:18 +01:00
akallabeth
861eaa693b Removed windows debug console 4096 character limit 2022-02-28 16:49:18 +01:00
akallabeth
8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
66ad508b45 Removed strlen use in wlog (and speed up check) 2019-10-29 12:58:06 +01:00
Armin Novak
09d43a66f4 Fixed tests and dead store warnings. 2017-03-28 16:49:56 +02:00
Armin Novak
61633a1c66 Fixed android build issues. 2016-02-01 15:21:07 +01:00
Xiaodong Qi
602d2715a2 Fix compilation error under Visual Studio 2010
Visual Studio 2010 use a compiler that supports only C89, which
only supports declaring variable at top of a local scope. Moving
scope variable to the top of function should solve this problem.
2015-11-29 00:14:29 +08:00
Bernhard Miklautz
25137988fe wlog: fix build on windows 2015-11-09 19:47:51 +01:00
Bernhard Miklautz
07417599ce wlog: rework, cleanup and stabilize API
* 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
2015-11-09 18:25:45 +01:00
Martin Haimberger
b2398b3a9a wlog: fixed return values
wlog used to return an int but the only meaning
of the return value was:

 * negative ... error
 * 0 or positive ... success

but the positve returned value was 1 or some id of some
subsystem, nothing meaningful for the caller.

For a more meaningful returnvalue we now use BOOL.

If something goes wrong FALSE is returned.
2015-10-21 01:11:06 -07:00
Armin Novak
1d3e847f12 Fixed broken indent. 2015-05-06 15:37:55 +02:00
Armin Novak
c0fbaa579b Not writing messages if level is WLOG_OFF. 2015-05-06 10:58:57 +02:00
Armin Novak
c375071b5d Console logging to stdout and stderr
With this patch the default for the console logger
changes to writing to stdout for TRACE, DEBUG and INFO
messages and stderr for WARNING, ERROR and FATAL messages.
2015-05-06 10:56:30 +02:00
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Armin Novak
77ae3bc8b3 Fixed missing argument checks in logger, fixed crashes if file not created. 2014-08-14 10:38:02 +02:00
Armin Novak
e6ed76977a DEBUG_PRINT now a define, resolves linking issues.
Using log name as logcat tag now.
Removed log name from default android log formatting.
2014-08-07 21:51:52 +02:00
Armin Novak
1a37435a26 Added redirection of ConsoleAppender to logcat, if used on android.
Using custom default format for log messages on android.
2014-08-07 17:47:59 +02:00
Marc-André Moreau
1ddd6c5e0d libwinpr-utils: add WLog support for Win32 debugger console output 2014-05-31 10:10:19 -04:00
Martin Haimberger
65d7e17d4c improved WLog
childlogger use per default now a WLOG_LEVEL_INHERIT level
so the loglevel is taken from the first parent which has another level set.
2014-01-15 05:52:48 -08:00
Marc-André Moreau
a3f0f4c8dc libfreerdp-core: started logging packets to pcap file 2013-10-08 23:43:57 -04:00
Marc-André Moreau
684db03578 libwinpr-utils: start implement wlog packet appender 2013-10-08 23:18:59 -04:00
Marc-André Moreau
353816e050 Merge pull request #6 from MartinHaimberger/loglevel
Loglevel
2013-10-08 15:53:54 -07:00
Marc-André Moreau
e37981e57c libwinpr-utils: improved binary appender 2013-10-04 11:33:49 -04:00
Martin Haimberger
5e073f5f17 loglevel filtering fix 2013-10-03 06:32:12 -07:00
Marc-André Moreau
aaeb4ea0b2 libwinpr-utils: add wlog support for image and binary data 2013-10-02 15:41:46 -04:00
Marc-André Moreau
2684b829d0 libwinpr-utils: add simple parent/child hierarchy 2013-10-01 18:19:50 -04:00
Marc-André Moreau
a374525e6a libwinpr-utils: split wlog framework 2013-10-01 16:08:26 -04:00