6.5 Logging and Verbosity

We use the lgr package for logging and progress output. Because lgr comes with its own exhaustive vignette, we will just briefly give examples how you can change the most important settings related to logging in mlr3.

6.5.1 Available logging levels

lgr comes with certain numeric thresholds which correspond to verbosity levels of the logging. For mlr3 the default is set to 400 which corresponds to level “info”. The following ones are available:

6.5.2 Global Setting

lgr comes with a global option called "lgr.default_threshold" which can be set via options(). You can set a specific level in your .Rprofile which is then used for all packages that use the lgr package. This approach may not be desirable if you want to only change the logging level for mlr3.

6.5.3 Changing mlr3 logging levels

To change the setting for mlr3 only, you need to change the threshold of the mlr3 logger like this:

Remember that this change only applies to the current R session.