mirror of
https://github.com/aquasecurity/kube-hunter.git
synced 2026-02-14 09:59:55 +00:00
Fix linting issues with flake8 and black. Add pre-commit congifuration, update documnetation for it. Apply linting check in Travis CI.
17 lines
461 B
Python
17 lines
461 B
Python
import logging
|
|
|
|
from kube_hunter.conf.parser import parse_args
|
|
|
|
config = parse_args()
|
|
formatter = "%(asctime)s %(levelname)s %(name)s %(message)s"
|
|
|
|
loglevel = getattr(logging, config.log.upper(), None)
|
|
|
|
if not loglevel:
|
|
logging.basicConfig(level=logging.INFO, format=formatter)
|
|
logging.warning("Unknown log level selected, using info")
|
|
elif config.log.lower() != "none":
|
|
logging.basicConfig(level=loglevel, format=formatter)
|
|
|
|
import plugins # noqa
|