wsd: support EnableExperimental in Log

Now that we depend on EnableExperimental in Log.cpp,
we must define it in the standalone binaries that
otherwise don't define it.

Change-Id: Ic56032eaf6df7d0d5d707a60eeddf2d75c9041ac
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
pull/7365/head
Ashod Nakashian 2023-08-23 08:31:58 -04:00 committed by Michael Meeks
parent a00fbae7c5
commit 57a9cf053a
6 changed files with 16 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include <Poco/PatternFormatter.h>
#include <Poco/SplitterChannel.h>
#include "Common.hpp"
#include "Log.hpp"
#include "Util.hpp"
@ -364,7 +365,12 @@ namespace Log
channel->setProperty("warningColor", "magenta");
}
else
channel = static_cast<Poco::Channel*>(new Log::ConsoleChannel());
{
if (EnableExperimental)
channel = static_cast<Poco::Channel*>(new Log::ConsoleChannel());
else
channel = static_cast<Poco::Channel*>(new Poco::ConsoleChannel());
}
/**
* Open the channel explicitly, instead of waiting for first log message
@ -394,7 +400,7 @@ namespace Log
struct tm tm;
LOG_INF("Initializing " << name << ". Local time: "
<< std::put_time(localtime_r(&t, &tm), "%a %F %T %z")
<< ". Log level is [" << logger->getLevel() << "].");
<< ". Log level is [" << logger->getLevel() << ']');
}
Poco::Logger& logger()

View File

@ -47,6 +47,7 @@ constexpr int HttpPortNumber = 9191;
constexpr int SslPortNumber = 9193;
static bool EnableHttps = false;
bool EnableExperimental = false;
struct Session
{

View File

@ -30,6 +30,8 @@
// and probably it is not a good idea to remove that?
#include "FakeSocket.hpp"
bool EnableExperimental = false;
class FakeSocketTest : public CPPUNIT_NS::TestFixture
{
CPPUNIT_TEST_SUITE(FakeSocketTest);

View File

@ -42,6 +42,8 @@ using Poco::Util::XMLConfiguration;
#define MIN_PWD_ITERATIONS 1000
#define MIN_PWD_HASH_LENGTH 20
bool EnableExperimental = false;
class CoolConfig final: public XMLConfiguration
{
public:

View File

@ -56,6 +56,7 @@ using Poco::TemporaryFile;
using Poco::URI;
using Poco::Util::Application;
bool EnableExperimental = false;
static bool closeExpected = false;
static std::mutex coutMutex;

View File

@ -31,6 +31,8 @@
using Poco::TemporaryFile;
using Poco::Util::Application;
bool EnableExperimental = false;
extern "C"
{
static void myCallback(int type, const char* payload, void*)