mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dispatcher option to log output (#15230)
* Dispatcher option to log output -o --log-output Log output into various files in the log directory wire up -d option to be passed into scheduled commands Caution, can fill your disk. * style fixes * more silly style fixes (and a typo accidentally added) * final lint maybe? * more lint... * believe it or not, more lint
This commit is contained in:
@@ -5,11 +5,10 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
from logging import info
|
||||
|
||||
import LibreNMS
|
||||
|
||||
from logging import info
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description="LibreNMS Service - manages polling and other periodic processes"
|
||||
@@ -23,6 +22,12 @@ if __name__ == "__main__":
|
||||
)
|
||||
parser.add_argument("-v", "--verbose", action="count", help="Show verbose output.")
|
||||
parser.add_argument("-d", "--debug", action="store_true", help="Show debug output.")
|
||||
parser.add_argument(
|
||||
"-o",
|
||||
"--log-output",
|
||||
action="store_true",
|
||||
help="Log poller ouput to files. Warning: This could use significant disk space!",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-m",
|
||||
"--multiple",
|
||||
@@ -61,6 +66,7 @@ if __name__ == "__main__":
|
||||
sys.exit(2)
|
||||
|
||||
service.config.single_instance = args.multiple
|
||||
service.config.log_output = args.log_output
|
||||
|
||||
if args.group:
|
||||
if isinstance(args.group, list):
|
||||
|
Reference in New Issue
Block a user