Custom nix::Logger
implementation used to filter some messages.
More...
|
| FilteredLogger (bool printBuildLogs) |
|
bool | isVerbose () override |
| Whether the logger prints the whole build log.
|
|
void | warn (const std::string &msg) override |
| Emit a log message with a colored "warning:" prefix.
|
|
void | log (nix::Verbosity lvl, std::string_view str) override |
| Emit a log line depending on verbosity setting.
|
|
void | logEI (const nix::ErrorInfo &einfo) override |
| Emit error information.
|
|
void | startActivity (nix::ActivityId, nix::Verbosity lvl, nix::ActivityType, const std::string &str, const Fields &, nix::ActivityId) override |
| Begin an activity block.
|
|
void | result (nix::ActivityId, nix::ResultType type, const Fields &fields) override |
| Report the result of an RPC call with a remote nix store.
|
|
|
bool | shouldIgnoreWarning (const std::string &str) |
| Detect ignored warnings.
|
|
bool | shouldIgnoreMsg (std::string_view str) |
| Detect ignored messages.
|
|
Custom nix::Logger
implementation used to filter some messages.
This is an exact copy of nix::SimpleLogger
with the addition of filtering in the log
routine.
◆ log()
void flox::FilteredLogger::log |
( |
nix::Verbosity |
lvl, |
|
|
std::string_view |
str |
|
) |
| |
|
inlineoverride |
Emit a log line depending on verbosity setting.
- Parameters
-
lvl | Minimum required verbosity level to emit the message. |
str | The message to emit. |
◆ shouldIgnoreWarning()
bool flox::FilteredLogger::shouldIgnoreWarning |
( |
const std::string & |
str | ) |
|
|
inlineprotected |
Detect ignored warnings.
In theory this is normally controlled by verbosity, but because the verbosity setting conditionals exist in external libs, we have to handle them here.
◆ color
bool flox::FilteredLogger::color |
Whether we should emit colors in logs.
◆ printBuildLogs
bool flox::FilteredLogger::printBuildLogs |
Whether we should emit build logs.
◆ systemd
bool flox::FilteredLogger::systemd |
Whether we should emit systemd
style logs.
◆ tty
bool flox::FilteredLogger::tty |
Whether we are connected to a TTY.
The documentation for this class was generated from the following file: