mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-02 03:26:11 -04:00
CLI: enable log prefixing
This adds a commandline option which enables log level prefixing. These prefixes enable log level-based filtering in journalctl when present so long as logs are going to the journal, and `SyslogLevelPrefix=` is set to `true` (which it is by default). For documentation: https://manpages.debian.org/testing/libsystemd-dev/sd-daemon.3.en.html
This commit is contained in:
parent
f384d0b830
commit
af0f3ed378
3 changed files with 52 additions and 18 deletions
|
@ -29,7 +29,9 @@ import json
|
|||
import threading
|
||||
import socket
|
||||
|
||||
args = argparse.Namespace()
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
brozzler.cli.add_common_options(arg_parser)
|
||||
args = arg_parser.parse_args([])
|
||||
args.log_level = logging.INFO
|
||||
brozzler.cli.configure_logging(args)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue