@@ -182,16 +182,24 @@ def filter(self,
182182
183183
184184def get_handlers (log_console = True ,
185+ log_level_console = defaults .LOG_LEVEL ,
185186 log_file_class = None ,
186187 log_file_options = None ,
187- log_level = defaults .LOG_LEVEL ):
188+ log_level_file = defaults .LOG_LEVEL ):
188189 """Get the handlers to use when logging.
189190
190191 Parameters
191192 ----------
192193 log_console : ``bool``, ``True``
193194 Whether to write log messages to the console.
194195
196+ log_level_console : ``str``, ``bulkDGD.defaults.LOG_LEVEL``
197+ The level below which log messages will not be logged on the
198+ console.
199+
200+ By default, it takes the value of
201+ ``bulkDGD.defaults.LOG_LEVEL``.
202+
195203 log_file_class : ``logging.FileHandler``, optional
196204 A ``FileHandler`` class to construct the handler that will
197205 log to a file.
@@ -205,8 +213,9 @@ def get_handlers(log_console = True,
205213
206214 It must be provided if ``log_file_class`` is provided.
207215
208- log_level : ``str``, ``bulkDGD.defaults.LOG_LEVEL``
209- The level below which log messages will be ignored.
216+ log_level_file : ``str``, ``bulkDGD.defaults.LOG_LEVEL``
217+ The level below which log messages will not be logged to the
218+ file.
210219
211220 By default, it takes the value of
212221 ``bulkDGD.defaults.LOG_LEVEL``.
@@ -229,7 +238,7 @@ def get_handlers(log_console = True,
229238 handler = log .StreamHandler ()
230239
231240 # Set the handler's level.
232- handler .setLevel (log_level )
241+ handler .setLevel (log_level_console )
233242
234243 # Add the handler to the list of handlers.
235244 handlers .append (handler )
@@ -275,7 +284,7 @@ def get_handlers(log_console = True,
275284 handler = log_file_class (** log_file_options )
276285
277286 # Set the handler's level.
278- handler .setLevel (log_level )
287+ handler .setLevel (log_level_file )
279288
280289 # Add the handler to the list of handlers.
281290 handlers .append (handler )
0 commit comments