A logger that passes on to logger only the entries at threshold or above,
and none at all when it is silent.
This is for an extension's own log-level setting. VS Code filters a log
channel by the level the user picks, with Developer: Set Log Level or in
the Output panel, and the API gives an extension no way to change that
level. A setting of the extension's own can therefore only make the log
quieter than the channel already is, and this is how it does.
threshold may be a function, read on every entry, so that a logger made
once — by a service when it is constructed, say — follows the setting as it
changes. A threshold that throws, or that is not one of the six, lets every
entry through: a broken filter must not hide the log, and logging must not
fail the work that logged. Children from withFields keep the threshold.
A logger that passes on to
loggeronly the entries atthresholdor above, and none at all when it issilent.This is for an extension's own log-level setting. VS Code filters a log channel by the level the user picks, with
Developer: Set Log Levelor in the Output panel, and the API gives an extension no way to change that level. A setting of the extension's own can therefore only make the log quieter than the channel already is, and this is how it does.thresholdmay be a function, read on every entry, so that a logger made once — by a service when it is constructed, say — follows the setting as it changes. A threshold that throws, or that is not one of the six, lets every entry through: a broken filter must not hide the log, and logging must not fail the work that logged. Children fromwithFieldskeep the threshold.