16 Commits

Author SHA1 Message Date
tomFlowee 363153e9df Support logging line numbers and file/method names. 2026-04-11 00:26:48 +02:00
tomFlowee ef96b62937 Add calling thread ID to the log output. 2026-04-10 23:53:01 +02:00
tomFlowee df4e1de6fd Add new log channel FastLogChannel
This log channel copies the log line and instantly returns to allow the
main codebase to not have an impact on logging speed.

Normal usage this isn't really relevant, but for cases where we want a
massive amount of logging for performance tuning the logging ends up
being a bottle-neck. Well, not logging but the output channel ends up
being a IO based bottleneck.
This log channel moves the IO based work to its own thread in order
to ensure that the main code works at full speed.
2026-04-10 23:30:57 +02:00
tomFlowee f3fb02a522 Make channel interface available
The manager now has an addChannel() method for anyone wanting to
implement a separate logging channel.
2022-11-24 18:14:14 +01:00
tomFlowee ae78dd0bb8 Update email address 2021-06-20 22:44:44 +02:00
TomZ d430a4be8a Update all usages of boost create_directories
The API throws when the directories already exist, which is quite
unexpected.
This now changes the code to silently ignore these issues in the
knowledge that the immediately following opening of files will
fail with a nice error message.
2020-11-23 14:09:00 +01:00
TomZ 7248251a5a Fix warning.
Avoid std::move here.
2020-10-27 16:33:08 +01:00
TomZ df7de2ecd2 Clean up the hairy ball of util.cpp
Move some globals and all stuff pulling in crypto to the
server/serverutil.cpp file

Remove dead code.

Move several items that were used in only one place to the respective
files using them.

Move the class WaitUntilFinishedHelper into its own file.

Made sure no header includes utils.h
remove a handfull of files including utils.h for nothing.
2019-08-24 22:25:09 +02:00
TomZ c1fa50d7f8 Handle when user asked to log to a file we can't open
This now logs that problem to the console.
2019-08-12 21:51:42 +02:00
TomZ 8d716cba28 Allow log path to be a dir
Allow logs.conf to supply the file-path as an (existing) directory which
will lead to the result of opening the standard filename in that dir.
2019-05-08 17:04:09 +02:00
TomZ c182d809fb Make logging now be tuned for qtestlib
as the boost testlib is too erretic and gives us bugs, make the common
framework support qtestlib instead
2018-08-14 15:53:00 +02:00
TomZ 438f9d4f1b Add generic testing decorator
This integrates unit tests into the logging system
so I can see the unit test we are currently in reflected in the log-
line.
2018-05-09 10:48:16 +02:00
TomZ a40dd928d6 Make logger create required dirs to open logfile 2018-04-11 12:19:18 +02:00
TomZ 22b91334b5 Several logging improvements;
* logs.conf now also found directly in the homedir if there is no
$HOME/.config dir
* default filename is now 'hub.log' instead of 'debug.log'
* logs.conf now also detects ALL as a keyword for section
* logs.conf now also supports 'option path [path]'
2018-03-08 19:32:14 +01:00
TomZ ace04a5070 Remove debug sections configuration via commandline. 2018-02-16 12:36:11 +01:00
TomZ b76ca3a97e Start libs/utils 2018-02-13 13:27:58 +01:00