Skip to content

Commit 04ab616

Browse files
committed
Default to info with CI override
1 parent d93ac5b commit 04ab616

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ci/fireci/fireci/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
from .internal import main
2121

2222
# Unnecessary on CI as GitHub Actions provides them already.
23-
asctime_place_holder = '' if os.getenv('CI') else '%(asctime)s '
23+
is_ci = os.getenv('CI')
24+
asctime_place_holder = '' if is_ci else '%(asctime)s '
2425
log_format = f'[%(levelname).1s] {asctime_place_holder}%(name)s: %(message)s'
2526
logging.basicConfig(
2627
datefmt='%Y-%m-%d %H:%M:%S %z %Z',
2728
format=log_format,
2829
level=logging.INFO,
2930
)
30-
logging.getLogger('fireci').setLevel(logging.DEBUG)
31+
32+
level = logging.DEBUG if is_ci else logging.INFO
33+
logging.getLogger('fireci').setLevel(level)
3134

3235
plugins.discover()
3336

0 commit comments

Comments
 (0)