Chris,

Christopher Schultz wrote on 20.12.2010 21:29:
No wonder it's not working: System.stdout and System.stderr don't exist
as far as I know. Did you mean System.err and System.out? Precision
counts, especially when things aren't working the way you expect them to be.
you are right. Of course I use System.err and System.out....
I was thinking of your conf/logging.properties file as well as your
configuration for tomcat6w.exe. Describing the log config from
tomcat6w.exe (as you have done) and posting logging.properties should be
enough.
see attachment
:( Attachments are often stripped from posts to the list. Try just
copy-and-pasting inline.
my last attachment went through even so I go an error message. This time I didn't get a message so I would have thought it's ok.
I now put it at the end of the message.
Logging set up from tomcat6w:

     * Level: Info
     * Log path:<apache install dir>\logs
     * Log prefix: jakarta_service_
     * Redirect Stdout: auto
     * Redirect Stderr: auto
Someone more familiar with win32 will have to comment on what those
settings are expected to produce. Note that the "Log*" parameters have
nothing to do with stdout/stderr: they are for reporting (whatever) to
the Windows System Log.

The documentation I can find for the --StdOutput and --StdError
command-line parameters seem to indicate that they describe a filename.
I would expect "auto" to be the filename. If you haven't specified the
path, you will have to check the working directory of the service to
determine where that file will try to be written.

I'm not sure if Tomcat's service wrapper will fail silently or angrily
if files cannot be created. If I were you, I'd specify an exact
filename, including full path, for the "Redirect Stdout" and "Redirect
Stderr" settings, and make sure that the effective user running the
Tomcat service (TOMCAT? LOCAL_SERVICE?) has rights to write to that
file/directory.
this is exactly what I did on a previous suggestion. I replaced the "auto" bits with "C:\tmp\stderr" and "C:\tmp\stdout". Tomcat creates the files and writes into stdout. It also creates stderr but it remains empty. When I set it to "auto" the files are created in the standard log directory with the names stdout_XXX.log and stderr_XXX.log where XXX is the date the files were created.

So from this behaviour I would say, that these settings are for output of Tomcat (too).

Thomas

logging.properties:

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.

3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.

4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

# For example, set the com.xyz.foo logger to only log SEVERE
# messages:
#org.apache.catalina.startup.ContextConfig.level = FINE
#org.apache.catalina.startup.HostConfig.level = FINE
#org.apache.catalina.session.ManagerBase.level = FINE
#org.apache.catalina.core.AprLifecycleListener.level=FINE

--
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 München
Registergericht: Amtsgericht München, HRB 88283
Geschäftsführer: Albert Fuss


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to