Read log filter spec file.
Very simple utility class offering a couple of static operations to parse different filter files for the command line logger. Each line specifies one filter list entry. Comment lines have to start with #. Here's an example for a valid configuration file:
\code
# Level (info or debug) Trace Rank (-1 means all ranks) Black or white list entry
#
# General debug settings
#
debug peano -1 black
#
# General info settings
#
info peano -1 white
info my::full::qualified::class::name -1 black
debug my::full::qualified::class::name 43 white
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
- Author
- Tobias Weinzierl, Kristof Unterweger
Definition at line 49 of file LogFilterFileReader.h.
| static bool tarch::logging::LogFilterFileReader::parsePlainTextFile |
( |
const std::string & |
filename | ) |
|
|
static |
Tries to parse a simple text file where each line contains an entry.
If the file does not exist or the parse did not succeed, the operation writes an error and returns false. Otherwise, it returns true.
If the routine fails, it switches on all log information automatically. If you want to create a (hard-coded) fall-back logging, you thus might have to call clearFilterList() again before you continue.
- Returns
- Parsing has been successful