Hello,
Gnunet is flooding my disk with a huge log file in
~/.cache/gnunet/gnunet-2020-080-26.log, this file contains lots of such
entries:
Aug 28 10:01:06-523074 util-service-967 WARNING Processing code for
message of type 367 did not call `GNUNET_SERVICE_client_continue' after 39 h
Before looking at the root cause of these logs, I'd like gnunet NOT to
log things on-disk, but to send its logs to syslog() instead so I could
review them with systemd's journalctl. Question is - how should I proceed?
I noticed that gnunet mostly logs things by calling a LOG() function
that is redefined on a per-module basis and usually points to
GNUNET_log_from(), the latter being a short #define snippet in
include/gnunet_common.h that may call GNUNET_log_from_nocheck() from
util/common_logging.c, which itself calls a static mylog() function from
the same module.
The amount of chained functions and definitions is slightly confusing
me, so before blindly hacking the code, I'm asking here: what would be
the "proper" way I should follow to make gnunet output logs through
syslog? In common_logging.c there are some convenience functions like
GNUNET_logger_add() and GNUNET_logger_remove() - but I have no clue how
one is supposed to interact with them. Any hints please?
On a side note - is there some kind of documentation about the code
architecture? I mean typically - "what does module x is supposed to do,
in what context it is called and by who".
Mateusz