No matter what I do, it seems that Poco will never get the Source that I provide it to the Windows Event Viewer. Below is the code I am using but Poco forcefully changes the source to the name of Program executable instead of the source that I supplied (MyClassSource):
********************************************************************************************************************************************************
class MyClass {
public:
MyClass() :
channel_(Poco::LoggingFactory::defaultFactory().createChannel("EventLogChannel")),
logger_(Poco::Logger::create("MyClassSource",channel_,Poco::Message::PRIO_TRACE))
{
Poco::Message m("MyClassSource"," starting up fresh now
std::cout << std:: endl << "Message Source is: " << m.getSource() << std::endl;
m.setSource("CT01");
logger_.log(m);
}
Poco::Channel *channel_;
Poco::Logger logger_;
};
********************************************************************************************************************************************************
I need to fix this urgently and would be thankful if you could help me work around this bug.
Best, Asif
PS: I am not using Poco::Application. I am just using Poco's Logging framework.





