You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jerome Jacobsen <je...@gentootech.com> on 2001/08/09 15:43:15 UTC
NTEventLogAppender - remove ugly description message?
I just tried out the NTEventLogAppender. When I view the event in the Event
Viewer the Description says the following.
'The description for Event ID ( 4096 ) in Source ( Log4jTester ) cannot be
found. The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. The following
information is part of the event: Exiting application.'
I was expecting just 'Exiting application.'
Does anyone know how to get rid of that extra stuff that's getting added to
my message?
Regards,
Jerome
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: NTEventLogAppender - remove ugly description message?
Posted by Christopher Taylor <cs...@java-internals.com>.
No problems... yeah, it's the NTEventLogAppender.dll. According to the make
file, the resources are included in the DLL.
AddRegistryInfo is a function (sorry about the misnomer) in the
nteventlog.cpp file. It's responsible for adding the appropriate registry
entry for the message dll (the NTEventLogAppender.dll). It only needs to
run once, and you can verify if it has been run by opening the registry
editor and checking the values of the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\[s
ource name], where source name is the string passed into the
NTEventLogAppender method registerEventSource. If you look at the source
code for NTEventLogAppender.java, you'll see that the default source name is
Log4J.
If the NT Event Viewer is giving you grief, the reason is that the
NTEventLogAppender.dll hasn't been registered properly in the NT registry,
or that the Event Viewer application can't find the DLL. If you check the
registry as above and send me the results, I'll see what I can do.
-Chris
----- Original Message -----
From: "Jerome Jacobsen" <je...@gentootech.com>
To: "LOG4J Users Mailing List" <lo...@jakarta.apache.org>
Sent: Thursday, August 09, 2001 11:23 PM
Subject: RE: NTEventLogAppender - remove ugly description message?
> Please excuse my NT ignorance. When you say the 'message resource DLL'
are
> you referring to the NTEventLogAppender.dll or some other DLL?
> NTEventLogAppender.dll is in my path. If it wasn't I would get an
exception
> (java.lang.UnsatisfiedLinkError).
>
> What is addRegistryInfo? It doesn't appear to be a method on
> NTEventLogAppender class, at least not the version in Log4j 1.1.3.
>
> -Jerome
>
> -----Original Message-----
> From: Christopher Taylor [mailto:cstaylor@java-internals.com]
> Sent: Thursday, August 09, 2001 10:04 AM
> To: LOG4J Users Mailing List; jerome.jacobsen@gentootech.com
> Subject: Re: NTEventLogAppender - remove ugly description message?
>
>
> Yes, the message resource DLL needs to be registered in the NT Registry.
> The code addRegistryInfo handles that for you, so you need to make sure
that
> the NTEventLogAppender.dll is in your PATH (the windows system directory
> should work AFAIK).
>
> -Chris
> ----- Original Message -----
> From: "Jerome Jacobsen" <je...@gentootech.com>
> To: <lo...@jakarta.apache.org>
> Sent: Thursday, August 09, 2001 10:43 PM
> Subject: NTEventLogAppender - remove ugly description message?
>
>
> > I just tried out the NTEventLogAppender. When I view the event in the
> Event
> > Viewer the Description says the following.
> >
> > 'The description for Event ID ( 4096 ) in Source ( Log4jTester ) cannot
be
> > found. The local computer may not have the necessary registry
information
> or
> > message DLL files to display messages from a remote computer. The
> following
> > information is part of the event: Exiting application.'
> >
> > I was expecting just 'Exiting application.'
> >
> > Does anyone know how to get rid of that extra stuff that's getting added
> to
> > my message?
> >
> > Regards,
> >
> > Jerome
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
RE: NTEventLogAppender - remove ugly description message?
Posted by Jerome Jacobsen <je...@gentootech.com>.
Please excuse my NT ignorance. When you say the 'message resource DLL' are
you referring to the NTEventLogAppender.dll or some other DLL?
NTEventLogAppender.dll is in my path. If it wasn't I would get an exception
(java.lang.UnsatisfiedLinkError).
What is addRegistryInfo? It doesn't appear to be a method on
NTEventLogAppender class, at least not the version in Log4j 1.1.3.
-Jerome
-----Original Message-----
From: Christopher Taylor [mailto:cstaylor@java-internals.com]
Sent: Thursday, August 09, 2001 10:04 AM
To: LOG4J Users Mailing List; jerome.jacobsen@gentootech.com
Subject: Re: NTEventLogAppender - remove ugly description message?
Yes, the message resource DLL needs to be registered in the NT Registry.
The code addRegistryInfo handles that for you, so you need to make sure that
the NTEventLogAppender.dll is in your PATH (the windows system directory
should work AFAIK).
-Chris
----- Original Message -----
From: "Jerome Jacobsen" <je...@gentootech.com>
To: <lo...@jakarta.apache.org>
Sent: Thursday, August 09, 2001 10:43 PM
Subject: NTEventLogAppender - remove ugly description message?
> I just tried out the NTEventLogAppender. When I view the event in the
Event
> Viewer the Description says the following.
>
> 'The description for Event ID ( 4096 ) in Source ( Log4jTester ) cannot be
> found. The local computer may not have the necessary registry information
or
> message DLL files to display messages from a remote computer. The
following
> information is part of the event: Exiting application.'
>
> I was expecting just 'Exiting application.'
>
> Does anyone know how to get rid of that extra stuff that's getting added
to
> my message?
>
> Regards,
>
> Jerome
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: NTEventLogAppender - remove ugly description message?
Posted by Christopher Taylor <cs...@java-internals.com>.
Yes, the message resource DLL needs to be registered in the NT Registry.
The code addRegistryInfo handles that for you, so you need to make sure that
the NTEventLogAppender.dll is in your PATH (the windows system directory
should work AFAIK).
-Chris
----- Original Message -----
From: "Jerome Jacobsen" <je...@gentootech.com>
To: <lo...@jakarta.apache.org>
Sent: Thursday, August 09, 2001 10:43 PM
Subject: NTEventLogAppender - remove ugly description message?
> I just tried out the NTEventLogAppender. When I view the event in the
Event
> Viewer the Description says the following.
>
> 'The description for Event ID ( 4096 ) in Source ( Log4jTester ) cannot be
> found. The local computer may not have the necessary registry information
or
> message DLL files to display messages from a remote computer. The
following
> information is part of the event: Exiting application.'
>
> I was expecting just 'Exiting application.'
>
> Does anyone know how to get rid of that extra stuff that's getting added
to
> my message?
>
> Regards,
>
> Jerome
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org