Skip to content

Commit 4458115

Browse files
Nikita VoronchevNikita Voronchev
authored andcommitted
Proper loglevel_map definition.
1 parent c1341be commit 4458115

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pytest_reportportal/service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def __init__(self):
3030

3131
# Map loglevel codes from `logging` module to ReportPortal text names:
3232
self.loglevel_map = {
33-
0: "TRACE", # logging.NOTSET -> 'TRACE'
34-
10: "DEBUG",
35-
20: "INFO",
36-
30: "WARN",
37-
40: "ERROR",
38-
50: "ERROR", # logging.CRITICAL -> 'TRACE'
33+
logging.NOTSET: "TRACE",
34+
logging.DEBUG: "DEBUG",
35+
logging.INFO: "INFO",
36+
logging.WARNING: "WARN",
37+
logging.ERROR: "ERROR",
38+
logging.CRITICAL: "ERROR",
3939
}
4040

4141
def init_service(self, endpoint, project, uuid):

0 commit comments

Comments
 (0)