mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 10:09:36 +02:00
fixes for style and consistency
This commit is contained in:
@@ -23,9 +23,9 @@
|
|||||||
#include "Poco/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include "Poco/Formatter.h"
|
#include "Poco/Formatter.h"
|
||||||
#include "Poco/Message.h"
|
#include "Poco/Message.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
@@ -105,6 +105,8 @@ public:
|
|||||||
/// for details.
|
/// for details.
|
||||||
/// * times: Specifies whether times are adjusted for local time
|
/// * times: Specifies whether times are adjusted for local time
|
||||||
/// or taken as they are in UTC. Supported values are "local" and "UTC".
|
/// 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
|
/// If any other property name is given, a PropertyNotSupported
|
||||||
/// exception is thrown.
|
/// exception is thrown.
|
||||||
|
|||||||
@@ -249,15 +249,22 @@ namespace
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PatternFormatter::parsePriorityNames()
|
void PatternFormatter::parsePriorityNames()
|
||||||
{
|
{
|
||||||
for (int i = 0; i <= 8; i++)
|
for (int i = 0; i <= 8; i++)
|
||||||
|
{
|
||||||
_priorities[i] = priorities[i];
|
_priorities[i] = priorities[i];
|
||||||
StringTokenizer st (_priorityNames, ".", StringTokenizer::TOK_TRIM);
|
}
|
||||||
|
StringTokenizer st(_priorityNames, ",;", StringTokenizer::TOK_TRIM);
|
||||||
if (st.count() == 8)
|
if (st.count() == 8)
|
||||||
|
{
|
||||||
for (int i = 1; i <= 8; i++)
|
for (int i = 1; i <= 8; i++)
|
||||||
_priorities[i] = st[i - 1];
|
_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)
|
const std::string& PatternFormatter::getPriorityName(int prio)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user