Skip to content

Commit 9699ec1

Browse files
authored
Added logging-too-few-args message example (#6620)
1 parent 3f70782 commit 9699ec1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import logging
2+
3+
try:
4+
function()
5+
except Exception as e:
6+
logging.error('%s error occured: %s', e) # [logging-too-few-args]
7+
raise
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import logging
2+
3+
try:
4+
function()
5+
except Exception as e:
6+
logging.error('%s error occured: %s', type(e), e)
7+
raise

0 commit comments

Comments
 (0)