merge some changes from develop branch; modernize and clean-up code; remove support for compiling without POCO_WIN32_UTF8

This commit is contained in:
Günter Obiltschnig
2020-01-09 10:08:09 +01:00
parent 7c177b6f89
commit 1bf40a0cd2
389 changed files with 3029 additions and 4111 deletions

View File

@@ -21,9 +21,9 @@
#include "Poco/Foundation.h"
#include "Poco/Formatter.h"
#include "Poco/Message.h"
#include <vector>
namespace Poco {
@@ -77,6 +77,8 @@ class Foundation_API PatternFormatter: public Formatter
{
public:
using Ptr = AutoPtr<PatternFormatter>;
PatternFormatter();
/// Creates a PatternFormatter.
/// The format pattern must be specified with
@@ -102,6 +104,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.
@@ -113,9 +117,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:
@@ -134,11 +139,15 @@ private:
void parsePattern();
/// Will parse the _pattern string into the vector of PatternActions,
/// which contains the message key, any text that needs to be written first
/// a proprety in case of %[] and required length.
/// 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];
};