[
http://issues.apache.org/jira/browse/DIRSERVER-667?page=comments#action_12428884
]
Alex Karasulu commented on DIRSERVER-667:
-----------------------------------------
Procrun is broken
----------------------------
I don't think this is working at all. Meaning the stderr and stdout
redirection is broken or something is wrong with logging output to stdout. The
procrun executable has issues. If this was working properly then the default
logging output would go the stdout log file. It's not so we have issues.
Procrun log level != ApacheDS log level
--------------------------------------------------------------
Before I go on let me make a point about the logging facility in the service
manager. This is the procrun service manager customized for ApacheDS. It's
log level is *NOT* the log level of ApacheDS. This log level is for the
service manager code for running ApacheDS as a service on windows. To adjust
the logging properties of ApacheDS you need to edit the log4j.properties file
in the conf directory of your installation.
Workaround when running in service mode
-------------------------------------------------------------------
I do have a temporary workaround for this logging issue after some
experimentation. You can get nlog4j to append logs to a log file in addition
to stdout. Below I have configured a rolling log file as well as the stdout
appender. I'd leave the stdout appender to allow apacheds.exe to pump logs out
to the console when run in nonservice mode. I've attached this
log4j.properties file to this JIRA.
When you put this into your conf directory you're ApacheDS instance will
produce a apacheds-rolling.log and apacheds-rolling.log.1 file. By default it
will generate this file in C:\Windows\system32 so you want to generate it
somewhere else preferably in the log directory of your installation. To point
it to my ${install}\var\log directory I modified the working path on the
Startup and Shutdown tabs to C:\Program Files\apacheds-1.0-RC4-SNAPSHOT on my
system.
Hope this works for you. BTW that log4j.properties file is here:
https://issues.apache.org/jira/secure/attachment/12339062/log4j.properties
> Logging level settings ignored in apachedsw.exe windows NT service frontend
> (apachedsw.exe)
> -------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-667
> URL: http://issues.apache.org/jira/browse/DIRSERVER-667
> Project: Directory ApacheDS
> Issue Type: Bug
> Affects Versions: 1.0-RC3
> Environment: Win2k JDK 1.5-06
> Reporter: Alain Pannetier
> Assigned To: Alex Karasulu
> Priority: Critical
> Attachments: log4j.properties
>
>
> apachedsw.exe appears to ignore the requested settings for logging level.
> How to reproduce
> 1 - run %apacheds_home%\bin\apachedsw.exe
> 2 - In the "Logging" tab from the level combo, select Debug
> 3 - In the log prefix type test_debug.log
> 4 - in the log path set sth such as : C:\tmp\log
> 5 - In the Redirect stdout type C:\tmp\log\apacheds-stdout.log
> 6 - In the Redirect stderr type C:\tmp\log\apacheds-stderr.log
> 7 - Click on "Apply" and restart service.
> Perform some typical LDAP requests
> Have a look at the files in C:\tmp\log\
> All the expected files are there. None have any debug log entry...
> I can possibly help if told where to look.
> Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira