Skip to content

Commit a718469

Browse files
committed
fix logs
1 parent d3bd219 commit a718469

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

sdgym/benchmark.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,14 +1259,17 @@ def _get_s3_script_content(
12591259
from sdgym.benchmark import _run_jobs, _write_run_id_file, _update_run_id_file
12601260
from io import StringIO
12611261
from sdgym.result_writer import S3ResultsWriter
1262+
import sys
1263+
1264+
logging.basicConfig(
1265+
level=logging.INFO,
1266+
format='%(asctime)s - %(levelname)s - %(message)s',
1267+
stream=sys.stdout
1268+
)
1269+
12621270
LOGGER = logging.getLogger(__name__)
1263-
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)
1271+
LOGGER.info("This should show up on CloudWatch / logs")
1272+
12701273
12711274
12721275
s3_client = boto3.client(

0 commit comments

Comments
 (0)