Skip to content

Commit 2ee3a0f

Browse files
committed
Configure logging.
1 parent 59250e6 commit 2ee3a0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

nginxfmt.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ def _standalone_run(program_arguments):
318318
with _redirect_stdout_to_stderr():
319319
args = arg_parser.parse_args(program_arguments)
320320

321+
logging.basicConfig(
322+
level=logging.INFO if args.verbose else logging.ERROR,
323+
format='%(levelname)s: %(message)s')
324+
321325
try:
322326
if args.print_result and len(args.config_files) != 1:
323327
raise Exception("if %s is enabled, only one file can be passed as input" % argparse._get_action_name(

0 commit comments

Comments
 (0)