@@ -90,12 +90,14 @@ def test_all_log_levels_with_manifest_info_threshold(set_console_ip, info_thresh
90
90
qpylib .log ('hello warning' , 'WARNING' )
91
91
qpylib .log ('hello error' , 'ERROR' )
92
92
qpylib .log ('hello critical' , 'CRITICAL' )
93
+ qpylib .log ('hello exception' , 'EXCEPTION' )
93
94
verify_log_file_content (log_path , [
94
95
{'level' : 'INFO' , 'text' : 'hello default info' },
95
96
{'level' : 'INFO' , 'text' : 'hello info' },
96
97
{'level' : 'WARNING' , 'text' : 'hello warning' },
97
98
{'level' : 'ERROR' , 'text' : 'hello error' },
98
- {'level' : 'CRITICAL' , 'text' : 'hello critical' }],
99
+ {'level' : 'CRITICAL' , 'text' : 'hello critical' },
100
+ {'level' : 'ERROR' , 'text' : 'hello exception' }],
99
101
not_expected_lines = [{'level' : 'DEBUG' , 'text' : 'hello debug' }])
100
102
101
103
def test_all_log_levels_with_manifest_debug_threshold (set_console_ip , debug_threshold , tmpdir ):
@@ -109,13 +111,15 @@ def test_all_log_levels_with_manifest_debug_threshold(set_console_ip, debug_thre
109
111
qpylib .log ('hello warning' , 'WARNING' )
110
112
qpylib .log ('hello error' , 'ERROR' )
111
113
qpylib .log ('hello critical' , 'CRITICAL' )
114
+ qpylib .log ('hello exception' , 'EXCEPTION' )
112
115
verify_log_file_content (log_path , [
113
116
{'level' : 'DEBUG' , 'text' : 'hello debug' },
114
117
{'level' : 'INFO' , 'text' : 'hello default info' },
115
118
{'level' : 'INFO' , 'text' : 'hello info' },
116
119
{'level' : 'WARNING' , 'text' : 'hello warning' },
117
120
{'level' : 'ERROR' , 'text' : 'hello error' },
118
- {'level' : 'CRITICAL' , 'text' : 'hello critical' }])
121
+ {'level' : 'CRITICAL' , 'text' : 'hello critical' },
122
+ {'level' : 'ERROR' , 'text' : 'hello exception' }])
119
123
120
124
def test_all_log_levels_with_set_debug_threshold (set_console_ip , info_threshold , tmpdir ):
121
125
log_path = os .path .join (tmpdir .strpath , 'app.log' )
@@ -129,13 +133,15 @@ def test_all_log_levels_with_set_debug_threshold(set_console_ip, info_threshold,
129
133
qpylib .log ('hello warning' , 'WARNING' )
130
134
qpylib .log ('hello error' , 'ERROR' )
131
135
qpylib .log ('hello critical' , 'CRITICAL' )
136
+ qpylib .log ('hello exception' , 'EXCEPTION' )
132
137
verify_log_file_content (log_path , [
133
138
{'level' : 'DEBUG' , 'text' : 'hello debug' },
134
139
{'level' : 'INFO' , 'text' : 'hello default info' },
135
140
{'level' : 'INFO' , 'text' : 'hello info' },
136
141
{'level' : 'WARNING' , 'text' : 'hello warning' },
137
142
{'level' : 'ERROR' , 'text' : 'hello error' },
138
- {'level' : 'CRITICAL' , 'text' : 'hello critical' }])
143
+ {'level' : 'CRITICAL' , 'text' : 'hello critical' },
144
+ {'level' : 'ERROR' , 'text' : 'hello exception' }])
139
145
140
146
def test_all_log_levels_with_set_warning_threshold (set_console_ip , info_threshold , tmpdir ):
141
147
log_path = os .path .join (tmpdir .strpath , 'app.log' )
@@ -149,10 +155,12 @@ def test_all_log_levels_with_set_warning_threshold(set_console_ip, info_threshol
149
155
qpylib .log ('hello warning' , 'WARNING' )
150
156
qpylib .log ('hello error' , 'ERROR' )
151
157
qpylib .log ('hello critical' , 'CRITICAL' )
158
+ qpylib .log ('hello exception' , 'EXCEPTION' )
152
159
verify_log_file_content (log_path , [
153
160
{'level' : 'WARNING' , 'text' : 'hello warning' },
154
161
{'level' : 'ERROR' , 'text' : 'hello error' },
155
- {'level' : 'CRITICAL' , 'text' : 'hello critical' }],
162
+ {'level' : 'CRITICAL' , 'text' : 'hello critical' },
163
+ {'level' : 'ERROR' , 'text' : 'hello exception' }],
156
164
not_expected_lines = [
157
165
{'level' : 'DEBUG' , 'text' : 'hello debug' },
158
166
{'level' : 'INFO' , 'text' : 'hello default info' },
@@ -178,10 +186,12 @@ def test_set_log_level_with_bad_level_uses_info(set_console_ip, debug_threshold,
178
186
qpylib .log ('hello warning' , 'WARNING' )
179
187
qpylib .log ('hello error' , 'ERROR' )
180
188
qpylib .log ('hello critical' , 'CRITICAL' )
189
+ qpylib .log ('hello exception' , 'EXCEPTION' )
181
190
verify_log_file_content (log_path , [
182
191
{'level' : 'INFO' , 'text' : 'hello default info' },
183
192
{'level' : 'INFO' , 'text' : 'hello info' },
184
193
{'level' : 'WARNING' , 'text' : 'hello warning' },
185
194
{'level' : 'ERROR' , 'text' : 'hello error' },
186
- {'level' : 'CRITICAL' , 'text' : 'hello critical' }],
195
+ {'level' : 'CRITICAL' , 'text' : 'hello critical' },
196
+ {'level' : 'ERROR' , 'text' : 'hello exception' }],
187
197
not_expected_lines = [{'level' : 'DEBUG' , 'text' : 'hello debug' }])
0 commit comments