mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
fixes for style and consistency
This commit is contained in:
@@ -23,9 +23,9 @@
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Formatter.h"
|
||||
#include "Poco/Message.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
@@ -105,6 +105,8 @@ public:
|
||||
/// for details.
|
||||
/// * times: Specifies whether times are adjusted for local time
|
||||
/// or taken as they are in UTC. Supported values are "local" and "UTC".
|
||||
/// * priorityNames: Provide a comma-separated list of custom priority names,
|
||||
/// e.g. "Fatal, Critical, Error, Warning, Notice, Information, Debug, Trace"
|
||||
///
|
||||
/// If any other property name is given, a PropertyNotSupported
|
||||
/// exception is thrown.
|
||||
|
||||
@@ -249,15 +249,22 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
void PatternFormatter::parsePriorityNames()
|
||||
{
|
||||
for (int i = 0; i <= 8; i++)
|
||||
{
|
||||
_priorities[i] = priorities[i];
|
||||
StringTokenizer st (_priorityNames, ".", StringTokenizer::TOK_TRIM);
|
||||
}
|
||||
StringTokenizer st(_priorityNames, ",;", StringTokenizer::TOK_TRIM);
|
||||
if (st.count() == 8)
|
||||
{
|
||||
for (int i = 1; i <= 8; i++)
|
||||
_priorities[i] = st[i - 1];
|
||||
}
|
||||
else throw Poco::SyntaxException("priorityNames property must specify a comma-separated list of 8 property names");
|
||||
}
|
||||
|
||||
|
||||
const std::string& PatternFormatter::getPriorityName(int prio)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user