logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

RE: Logging from a Windows Service: msg#00040

apache.logging.log4cxx.user

Subject: RE: Logging from a Windows Service

I'll try all of these things, but I do believe that the privileges are OK,
since something like:

Service.exe /service params

Run from the command prompt logs fine, creating the file in the place I'd
expect it to be. I already suspected that it didn't know where to resolve the
configuration file, so I used an explicit path (C:\\....\\configuration.xml),
so I don't think that's the issue. I also leave the logger reference around,
so I'm actually using the same Logger variable the second time (when it fails)
as I did when it worked the first time (from the command line).

BTW, I'm using CVS HEAD from about 2/22.

Myron Drapal
drapal@xxxxxxxxx
(303) 538-3513
-----Original Message-----
From: Curt Arnold [mailto:carnold@xxxxxxxxxx]
Sent: Monday, March 14, 2005 6:03 PM
To: Log4CXX User
Subject: Re: Logging from a Windows Service

Not enough information to go on really.

Are you using 0.9.7 or CVS HEAD?

Are you using relative paths in your configuration? They might be
getting resolved to unexpected paths.

Have you tried using OutputDebugAppender and monitoring the service
with DebugView
(http://www.sysinternals.com/ntw2k/freeware/debugview.shtml) or other
Debug monitor? That would at least allow you to check that
configuration works as expected and then progress to figuring out why a
particular appender isn't working as expected.

log4cxx doesn't do any trickery with privileges, the process has to
have the rights to create and write to the log file.


On Mar 14, 2005, at 6:36 PM, Drapal, Myron E (Myron) wrote:

> Has anyone tried to log from a Windows Service?  It seems to work if
> the service is started from the command line, but if the log entries
> are generated after the service is started (via the Control Panel
> Services Applet), the logs are not written.  I think that this is most
> likely a security policy problem, but don't know what security context
> that log4cxx is expecting (i.e. does it set the security context
> anywhere, what permissions does it expect to have when the files are
> created/written)?
>
>  
>
> Myron Drapal
>
> drapal@xxxxxxxxx
>
>  
> <Drapal, Myron E (Myron).vcf>

Attachment: Drapal, Myron E (Myron).vcf
Description: Drapal, Myron E (Myron).vcf

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo