mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-12-01 08:07:08 +01:00
Update POCO library.
This commit is contained in:
1 parent
8d15f4b6e9
commit
233fc103f9
2521 files changed
+257092
-72789
No files matched your search
+8
-8
@@ -31,10 +31,10 @@ int main(int argc, char** argv)
|
||||
{
|
||||
// set up two channel chains - one to the
|
||||
// console and the other one to a log file.
|
||||
FormattingChannel* pFCConsole = new FormattingChannel(new PatternFormatter("%s: %p: %t"));
|
||||
FormattingChannel* pFCConsole = new FormattingChannel(new PatternFormatter("[%O] %s: %p: %t"));
|
||||
pFCConsole->setChannel(new ConsoleChannel);
|
||||
pFCConsole->open();
|
||||
|
||||
|
||||
FormattingChannel* pFCFile = new FormattingChannel(new PatternFormatter("%Y-%m-%d %H:%M:%S.%c %N[%P]:%s:%q:%t"));
|
||||
pFCFile->setChannel(new FileChannel("sample.log"));
|
||||
pFCFile->open();
|
||||
@@ -43,21 +43,21 @@ int main(int argc, char** argv)
|
||||
// each channel chain.
|
||||
Logger& consoleLogger = Logger::create("ConsoleLogger", pFCConsole, Message::PRIO_INFORMATION);
|
||||
Logger& fileLogger = Logger::create("FileLogger", pFCFile, Message::PRIO_WARNING);
|
||||
|
||||
|
||||
// log some messages
|
||||
consoleLogger.error("An error message");
|
||||
fileLogger.error("An error message");
|
||||
|
||||
|
||||
consoleLogger.warning("A warning message");
|
||||
fileLogger.error("A warning message");
|
||||
|
||||
|
||||
consoleLogger.information("An information message");
|
||||
fileLogger.information("An information message");
|
||||
|
||||
|
||||
poco_information(consoleLogger, "Another informational message");
|
||||
poco_warning_f2(consoleLogger, "A warning message with arguments: %d, %d", 1, 2);
|
||||
|
||||
|
||||
Logger::get("ConsoleLogger").error("Another error message");
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user