aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authordakovalkov <dakovalkov@yandex-team.ru>2022-02-10 16:47:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:57 +0300
commitb1375e869a0058e8f583ffd2c09d284203db1c2a (patch)
treef601a8ccf79397f21dc812fb0d58065258623604 /contrib/libs
parent9968a46231e337bd46eca82216b40f8eadec679c (diff)
downloadydb-b1375e869a0058e8f583ffd2c09d284203db1c2a.tar.gz
Restoring authorship annotation for <dakovalkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/poco/Foundation/include/Poco/LogStream.h14
-rw-r--r--contrib/libs/poco/Foundation/include/Poco/Logger.h258
-rw-r--r--contrib/libs/poco/Foundation/include/Poco/Message.h4
-rw-r--r--contrib/libs/poco/Foundation/src/ConsoleChannel.cpp18
-rw-r--r--contrib/libs/poco/Foundation/src/LogStream.cpp26
-rw-r--r--contrib/libs/poco/Foundation/src/Logger.cpp6
-rw-r--r--contrib/libs/poco/Foundation/src/PatternFormatter.cpp6
-rw-r--r--contrib/libs/poco/Foundation/src/SyslogChannel.cpp2
-rw-r--r--contrib/libs/poco/Net/src/RemoteSyslogChannel.cpp2
9 files changed, 168 insertions, 168 deletions
diff --git a/contrib/libs/poco/Foundation/include/Poco/LogStream.h b/contrib/libs/poco/Foundation/include/Poco/LogStream.h
index c3d3f0850a..8bb5717090 100644
--- a/contrib/libs/poco/Foundation/include/Poco/LogStream.h
+++ b/contrib/libs/poco/Foundation/include/Poco/LogStream.h
@@ -159,13 +159,13 @@ public:
/// Sets the priority for log messages to Message::PRIO_TRACE
/// and writes the given message.
- LogStream& test();
- /// Sets the priority for log messages to Message::PRIO_TEST.
-
- LogStream& test(const std::string& message);
- /// Sets the priority for log messages to Message::PRIO_TEST
- /// and writes the given message.
-
+ LogStream& test();
+ /// Sets the priority for log messages to Message::PRIO_TEST.
+
+ LogStream& test(const std::string& message);
+ /// Sets the priority for log messages to Message::PRIO_TEST
+ /// and writes the given message.
+
LogStream& priority(Message::Priority priority);
/// Sets the priority for log messages.
};
diff --git a/contrib/libs/poco/Foundation/include/Poco/Logger.h b/contrib/libs/poco/Foundation/include/Poco/Logger.h
index 8dbf8327c8..8e32ad72a6 100644
--- a/contrib/libs/poco/Foundation/include/Poco/Logger.h
+++ b/contrib/libs/poco/Foundation/include/Poco/Logger.h
@@ -351,34 +351,34 @@ public:
void trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9);
void trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10);
- void test(const std::string& msg);
- /// If the Logger's log level is at least PRIO_TEST,
- /// creates a Message with priority PRIO_TEST
- /// and the given message text and sends it
- /// to the attached channel.
-
- void test(const std::string& msg, const char* file, int line);
- /// If the Logger's log level is at least PRIO_TEST,
- /// creates a Message with priority PRIO_TEST
- /// and the given message text and sends it
- /// to the attached channel.
- ///
- /// File must be a static string, such as the value of
- /// the __FILE__ macro. The string is not copied
- /// internally for performance reasons.
-
- void test(const std::string& fmt, const Any& value1);
- void test(const std::string& fmt, const Any& value1, const Any& value2);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9);
- void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10);
-
-
+ void test(const std::string& msg);
+ /// If the Logger's log level is at least PRIO_TEST,
+ /// creates a Message with priority PRIO_TEST
+ /// and the given message text and sends it
+ /// to the attached channel.
+
+ void test(const std::string& msg, const char* file, int line);
+ /// If the Logger's log level is at least PRIO_TEST,
+ /// creates a Message with priority PRIO_TEST
+ /// and the given message text and sends it
+ /// to the attached channel.
+ ///
+ /// File must be a static string, such as the value of
+ /// the __FILE__ macro. The string is not copied
+ /// internally for performance reasons.
+
+ void test(const std::string& fmt, const Any& value1);
+ void test(const std::string& fmt, const Any& value1, const Any& value2);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9);
+ void test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10);
+
+
void dump(const std::string& msg, const void* buffer, std::size_t length, Message::Priority prio = Message::PRIO_DEBUG);
/// Logs the given message, followed by the data in buffer.
///
@@ -415,9 +415,9 @@ public:
bool trace() const;
/// Returns true if the log level is at least PRIO_TRACE.
- bool test() const;
- /// Returns true if the log level is at least PRIO_TEST.
-
+ bool test() const;
+ /// Returns true if the log level is at least PRIO_TEST.
+
static std::string format(const std::string& fmt, const std::string& arg);
/// Replaces all occurences of $0 in fmt with the string given in arg and
/// returns the result. To include a dollar sign in the result string,
@@ -511,7 +511,7 @@ public:
/// - information
/// - debug
/// - trace
- /// - test
+ /// - test
///
/// The level is not case sensitive.
@@ -668,21 +668,21 @@ private:
#define poco_trace_f4(logger, fmt, arg1, arg2, arg3, arg4) \
if ((logger).trace()) (logger).trace(Poco::format((fmt), (arg1), (arg2), (arg3), (arg4)), __FILE__, __LINE__); else (void) 0
-
- #define poco_test(logger, msg) \
- if ((logger).test()) (logger).test(msg, __FILE__, __LINE__); else (void) 0
-
- #define poco_test_f1(logger, fmt, arg1) \
- if ((logger).test()) (logger).test(Poco::format((fmt), (arg1)), __FILE__, __LINE__); else (void) 0
-
- #define poco_test_f2(logger, fmt, arg1, arg2) \
- if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2)), __FILE__, __LINE__); else (void) 0
-
- #define poco_test_f3(logger, fmt, arg1, arg2, arg3) \
- if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2), (arg3)), __FILE__, __LINE__); else (void) 0
-
- #define poco_test_f4(logger, fmt, arg1, arg2, arg3, arg4) \
- if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2), (arg3), (arg4)), __FILE__, __LINE__); else (void) 0
+
+ #define poco_test(logger, msg) \
+ if ((logger).test()) (logger).test(msg, __FILE__, __LINE__); else (void) 0
+
+ #define poco_test_f1(logger, fmt, arg1) \
+ if ((logger).test()) (logger).test(Poco::format((fmt), (arg1)), __FILE__, __LINE__); else (void) 0
+
+ #define poco_test_f2(logger, fmt, arg1, arg2) \
+ if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2)), __FILE__, __LINE__); else (void) 0
+
+ #define poco_test_f3(logger, fmt, arg1, arg2, arg3) \
+ if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2), (arg3)), __FILE__, __LINE__); else (void) 0
+
+ #define poco_test_f4(logger, fmt, arg1, arg2, arg3, arg4) \
+ if ((logger).test()) (logger).test(Poco::format((fmt), (arg1), (arg2), (arg3), (arg4)), __FILE__, __LINE__); else (void) 0
#else
#define poco_debug(logger, msg)
#define poco_debug_f1(logger, fmt, arg1)
@@ -694,11 +694,11 @@ private:
#define poco_trace_f2(logger, fmt, arg1, arg2)
#define poco_trace_f3(logger, fmt, arg1, arg2, arg3)
#define poco_trace_f4(logger, fmt, arg1, arg2, arg3, arg4)
- #define poco_test(logger, msg)
- #define poco_test_f1(logger, fmt, arg1)
- #define poco_test_f2(logger, fmt, arg1, arg2)
- #define poco_test_f3(logger, fmt, arg1, arg2, arg3)
- #define poco_test_f4(logger, fmt, arg1, arg2, arg3, arg4)
+ #define poco_test(logger, msg)
+ #define poco_test_f1(logger, fmt, arg1)
+ #define poco_test_f2(logger, fmt, arg1, arg2)
+ #define poco_test_f3(logger, fmt, arg1, arg2, arg3)
+ #define poco_test_f4(logger, fmt, arg1, arg2, arg3, arg4)
#endif
@@ -1310,78 +1310,78 @@ inline void Logger::trace(const std::string& fmt, const Any& value1, const Any&
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10), Message::PRIO_TRACE);
}
-inline void Logger::test(const std::string& msg)
-{
- log(msg, Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& msg, const char* file, int line)
-{
- log(msg, Message::PRIO_TEST, file, line);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1)
-{
- log(Poco::format(fmt, value1), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2)
-{
- log(Poco::format(fmt, value1, value2), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3)
-{
- log(Poco::format(fmt, value1, value2, value3), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4)
-{
- log(Poco::format(fmt, value1, value2, value3, value4), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5, value6), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9), Message::PRIO_TEST);
-}
-
-
-inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10)
-{
- log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10), Message::PRIO_TEST);
-}
-
-
+inline void Logger::test(const std::string& msg)
+{
+ log(msg, Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& msg, const char* file, int line)
+{
+ log(msg, Message::PRIO_TEST, file, line);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1)
+{
+ log(Poco::format(fmt, value1), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2)
+{
+ log(Poco::format(fmt, value1, value2), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3)
+{
+ log(Poco::format(fmt, value1, value2, value3), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5, value6), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9), Message::PRIO_TEST);
+}
+
+
+inline void Logger::test(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10)
+{
+ log(Poco::format(fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10), Message::PRIO_TEST);
+}
+
+
inline bool Logger::is(int level) const
{
return _level >= level;
@@ -1435,12 +1435,12 @@ inline bool Logger::trace() const
return _level >= Message::PRIO_TRACE;
}
-inline bool Logger::test() const
-{
- return _level >= Message::PRIO_TEST;
-}
-
+inline bool Logger::test() const
+{
+ return _level >= Message::PRIO_TEST;
+}
+
} // namespace Poco
diff --git a/contrib/libs/poco/Foundation/include/Poco/Message.h b/contrib/libs/poco/Foundation/include/Poco/Message.h
index 8b0c49afa2..4b628bd47f 100644
--- a/contrib/libs/poco/Foundation/include/Poco/Message.h
+++ b/contrib/libs/poco/Foundation/include/Poco/Message.h
@@ -52,8 +52,8 @@ public:
PRIO_NOTICE, /// A notice, which is an information with just a higher priority.
PRIO_INFORMATION, /// An informational message, usually denoting the successful completion of an operation.
PRIO_DEBUG, /// A debugging message.
- PRIO_TRACE, /// A tracing message. This is the lowest priority useful for production.
- PRIO_TEST /// A message for test environment.
+ PRIO_TRACE, /// A tracing message. This is the lowest priority useful for production.
+ PRIO_TEST /// A message for test environment.
};
Message();
diff --git a/contrib/libs/poco/Foundation/src/ConsoleChannel.cpp b/contrib/libs/poco/Foundation/src/ConsoleChannel.cpp
index 056e3fa4be..55084896bd 100644
--- a/contrib/libs/poco/Foundation/src/ConsoleChannel.cpp
+++ b/contrib/libs/poco/Foundation/src/ConsoleChannel.cpp
@@ -105,10 +105,10 @@ void ColorConsoleChannel::setProperty(const std::string& name, const std::string
{
_enableColors = icompare(value, "true") == 0;
}
- else if (name == "testColor")
- {
- _colors[Message::PRIO_TEST] = parseColor(value);
- }
+ else if (name == "testColor")
+ {
+ _colors[Message::PRIO_TEST] = parseColor(value);
+ }
else if (name == "traceColor")
{
_colors[Message::PRIO_TRACE] = parseColor(value);
@@ -154,10 +154,10 @@ std::string ColorConsoleChannel::getProperty(const std::string& name) const
{
return _enableColors ? "true" : "false";
}
- else if (name == "testColor")
- {
- return formatColor(_colors[Message::PRIO_TEST]);
- }
+ else if (name == "testColor")
+ {
+ return formatColor(_colors[Message::PRIO_TEST]);
+ }
else if (name == "traceColor")
{
return formatColor(_colors[Message::PRIO_TRACE]);
@@ -274,7 +274,7 @@ void ColorConsoleChannel::initColors()
_colors[Message::PRIO_INFORMATION] = CC_DEFAULT;
_colors[Message::PRIO_DEBUG] = CC_GRAY;
_colors[Message::PRIO_TRACE] = CC_GRAY;
- _colors[Message::PRIO_TEST] = CC_GRAY;
+ _colors[Message::PRIO_TEST] = CC_GRAY;
}
diff --git a/contrib/libs/poco/Foundation/src/LogStream.cpp b/contrib/libs/poco/Foundation/src/LogStream.cpp
index 5377beb9d0..9c0e8844e4 100644
--- a/contrib/libs/poco/Foundation/src/LogStream.cpp
+++ b/contrib/libs/poco/Foundation/src/LogStream.cpp
@@ -208,19 +208,19 @@ LogStream& LogStream::trace(const std::string& message)
}
-LogStream& LogStream::test()
-{
- return priority(Message::PRIO_TEST);
-}
-
-
-LogStream& LogStream::test(const std::string& message)
-{
- _buf.logger().test(message);
- return priority(Message::PRIO_TEST);
-}
-
-
+LogStream& LogStream::test()
+{
+ return priority(Message::PRIO_TEST);
+}
+
+
+LogStream& LogStream::test(const std::string& message)
+{
+ _buf.logger().test(message);
+ return priority(Message::PRIO_TEST);
+}
+
+
LogStream& LogStream::priority(Message::Priority messagePriority)
{
_buf.setPriority(messagePriority);
diff --git a/contrib/libs/poco/Foundation/src/Logger.cpp b/contrib/libs/poco/Foundation/src/Logger.cpp
index 741dac5f19..96adb5cee5 100644
--- a/contrib/libs/poco/Foundation/src/Logger.cpp
+++ b/contrib/libs/poco/Foundation/src/Logger.cpp
@@ -430,14 +430,14 @@ int Logger::parseLevel(const std::string& level)
return Message::PRIO_DEBUG;
else if (icompare(level, "trace") == 0)
return Message::PRIO_TRACE;
- else if (icompare(level, "test") == 0)
- return Message::PRIO_TEST;
+ else if (icompare(level, "test") == 0)
+ return Message::PRIO_TEST;
else
{
int numLevel;
if (Poco::NumberParser::tryParse(level, numLevel))
{
- if (numLevel > 0 && numLevel < 10)
+ if (numLevel > 0 && numLevel < 10)
return numLevel;
else
throw InvalidArgumentException("Log level out of range ", level);
diff --git a/contrib/libs/poco/Foundation/src/PatternFormatter.cpp b/contrib/libs/poco/Foundation/src/PatternFormatter.cpp
index 728c389aa0..1b7986e19d 100644
--- a/contrib/libs/poco/Foundation/src/PatternFormatter.cpp
+++ b/contrib/libs/poco/Foundation/src/PatternFormatter.cpp
@@ -231,15 +231,15 @@ namespace
"Notice",
"Information",
"Debug",
- "Trace",
- "Test"
+ "Trace",
+ "Test"
};
}
const std::string& PatternFormatter::getPriorityName(int prio)
{
- poco_assert (1 <= prio && prio <= 9);
+ poco_assert (1 <= prio && prio <= 9);
return priorities[prio];
}
diff --git a/contrib/libs/poco/Foundation/src/SyslogChannel.cpp b/contrib/libs/poco/Foundation/src/SyslogChannel.cpp
index c3d3c15f92..8e00236275 100644
--- a/contrib/libs/poco/Foundation/src/SyslogChannel.cpp
+++ b/contrib/libs/poco/Foundation/src/SyslogChannel.cpp
@@ -232,7 +232,7 @@ int SyslogChannel::getPrio(const Message& msg)
{
switch (msg.getPriority())
{
- case Message::PRIO_TEST:
+ case Message::PRIO_TEST:
case Message::PRIO_TRACE:
case Message::PRIO_DEBUG:
return LOG_DEBUG;
diff --git a/contrib/libs/poco/Net/src/RemoteSyslogChannel.cpp b/contrib/libs/poco/Net/src/RemoteSyslogChannel.cpp
index 8ad6d5b2d0..b2ca971d64 100644
--- a/contrib/libs/poco/Net/src/RemoteSyslogChannel.cpp
+++ b/contrib/libs/poco/Net/src/RemoteSyslogChannel.cpp
@@ -325,7 +325,7 @@ int RemoteSyslogChannel::getPrio(const Message& msg)
{
switch (msg.getPriority())
{
- case Message::PRIO_TEST:
+ case Message::PRIO_TEST:
case Message::PRIO_TRACE:
case Message::PRIO_DEBUG:
return SYSLOG_DEBUG;