Page 1 of 1

Windows Event Log - extraneous text

Posted: 16 Aug 2011, 12:25
by asiflse2
Hi,

While the message I log does appear in the Windows Event log, it falls below some extraneous information message from Windows. Something like this:

Event Type: Information
Event Source: CT01
Event Category: (8)
Event ID: 4096
Date: 8/12/2011
Time: 3:50:44 PM
User: N/A
Computer: LSE-7BF732D0CAD
Description:
The description for Event ID ( 4096 ) in Source ( CT01 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event:

Login Server Port: 1434. //MY MESSAGE


I would like to know the cause of the extraneous text and don't want this in the log. Also, I want to ask if I can set the Event Category which is appearing as (8) and Event ID which always appears as 4096.

Thanks & regards, Asif

Re: Windows Event Log - extraneous text

Posted: 18 Aug 2011, 07:46
by asiflse2
Hello,

Can I somehow get rid of the extraneous text?

Best, Asif

Re: Windows Event Log - extraneous text

Posted: 18 Aug 2011, 10:37
by guenter
Is your application linked with POCO statically or dynamically?

If it's linked dynamically, then the PocoFoundation[d].dll must be in your %PATH% and available to the event viewer application, as it will be used as the category and event message file (see [[http://www.eventlogblog.com/blog/2008/04/event-log-message-files-the-de.html this blog post]] for an explanation).

If you link statically, you need to create a DLL that acts as category and event message file yourself. The DLL must be named PocoMsg.dll and must also be in your %PATH%. To create that DLL you'll need to create a new Visual Studio project and include the files from the Logging/Message Files and Logging/Resource Files groups in the Foundation project.

Re: Windows Event Log - extraneous text

Posted: 18 Aug 2011, 13:05
by asiflse2
Hi Guenter,

I am linking to Poco dynamically. I have also already specified the "C:\libs\poco-1.4.1p1-all\bin" directory (where the PocoFoundationd.dll resides) in my system path environment variable. So, there should be no issue as you say. However, I am still getting this error. My application is not a Poco application - my main() is a normal main and I am just using the logger. May be this is the issue? What do you say?

Best regards, Asif