What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-03 15:25:06
python traceback single line logging module
import logging class OneLineExceptionFormatter(logging.Formatter): def formatException(self, exc_info): """ Format an exception so that it prints on a single line. """ result = super().for... Add solution -
Python 2021-11-17 21:52:16
python logging basicconfig stdout
# https://stackoverflow.com/a/14058475 import logging import sys root = logging.getLogger() root.setLevel(logging.DEBUG) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - ... Add solution -
Python 2021-09-16 19:48:04
python boto3 exception handling
import botocore import boto3 import logging # Set up our logger logging.basicConfig(level=logging.INFO) logger = logging.getLogger() client = boto3.client('kinesis') try: logger.info('Calling DescribeStream API on myDataStream') client.describe... Add solution
Best helpers
Erwin
+5
Dr.khan
+5
Volker Kamin
+5
Akash Patel
+5
Bill Reason
+5
Sultan
+5
Rednryt
+5
GuitarFan
+5
Emdms
+5
Vlk
+5
Hrishioa
+5
Rpeinhardt
+5
Boehmi
+5
Bobby J
+5
Mururoa
+5