Skip to content

Commit c6b6f75

Browse files
authored
Remove timestamps from fireci log output on CI (#4074)
1 parent d50a3d1 commit c6b6f75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ci/fireci/fireci/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@
1313
# limitations under the License.
1414

1515
import logging
16+
import os
1617

1718
from . import commands
1819
from . import plugins
1920
from .internal import main
2021

22+
# Unnecessary on CI as GitHub Actions provides them already.
23+
asctime_place_holder = '' if os.getenv('CI') else '%(asctime)s '
24+
log_format = f'[%(levelname).1s] {asctime_place_holder}%(name)s: %(message)s'
2125
logging.basicConfig(
2226
datefmt='%Y-%m-%d %H:%M:%S %z %Z',
23-
format='[%(levelname).1s] %(asctime)s %(name)s: %(message)s',
27+
format=log_format,
2428
level=logging.INFO,
2529
)
2630
logging.getLogger('fireci').setLevel(logging.DEBUG)

0 commit comments

Comments
 (0)