Pattern Formatter Priority Name Enhancement

Added a property to allow the user to specify the actual names for the
priorities that will go into the log.
This commit is contained in:
Don Edvalson
2015-08-14 09:16:05 -04:00
parent 7f6e38438c
commit 5c20361005
2 changed files with 27 additions and 2 deletions

View File

@@ -116,9 +116,10 @@ public:
static const std::string PROP_PATTERN;
static const std::string PROP_TIMES;
static const std::string PROP_PRIORITY_NAMES;
protected:
static const std::string& getPriorityName(int);
const std::string& getPriorityName(int);
/// Returns a string for the given priority value.
private:
@@ -139,9 +140,13 @@ private:
/// which contains the message key, any text that needs to be written first
/// a property in case of %[] and required length.
void parsePriorityNames();
std::vector<PatternAction> _patternActions;
bool _localTime;
std::string _pattern;
std::string _priorityNames;
std::string _priorities[9];
};