Functions related to logging are extracted into dedicated source files
for better maintainability.
The existing low-level logging API is extended with a generalized scheme
providing log functions log_{error, warning, notice, info, debug} that
log messages based on a global opt_log_level.
opt_log_level for now is set to LOG_NOTICE and might be modified via
command line options or config files in future releases.