Skip to content

Commit d3bd219

Browse files
committed
add logging handler
1 parent 8953371 commit d3bd219

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sdgym/benchmark.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,13 @@ def _get_s3_script_content(
12611261
from sdgym.result_writer import S3ResultsWriter
12621262
LOGGER = logging.getLogger(__name__)
12631263
LOGGER.setLevel(logging.INFO)
1264+
if not LOGGER.handlers:
1265+
handler = logging.StreamHandler()
1266+
handler.setLevel(logging.INFO)
1267+
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
1268+
handler.setFormatter(formatter)
1269+
LOGGER.addHandler(handler)
1270+
12641271
12651272
s3_client = boto3.client(
12661273
's3',

0 commit comments

Comments
 (0)