tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant Rajput <praj...@infocepts.com>
Subject Re: writing logs on a separate server while the project as jar file
Date Tue, 25 Jan 2011 01:25:42 GMT
Hi,

I am not using console output, its the latest version of stable log4j
release.

The application is not deployed as a complete web application as this is
being used inside the processes of tibco. So the TIBCO processes used this
application to generate the query, by simply giving in the inputs and
considering the String output. I have implemented logger and the
configuration file resides inside the tibco server, not inside my Java
application. So I am fetching an instance of logger form the tibco server
but for this I have to write separate code in each Java class willing to
write logs somewhere in tibco server.

What exactly I need is something that is the standard way to write logs to a
server where there are many Java application are deployed as separate jar
file and is being used by the tibco processes.

Thanks for Replying.
Prashant Rajput.

On Sat, Jan 22, 2011 at 5:08 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Prashant Rajput [mailto:prajput@infocepts.com]
> > Subject: writing logs on a separate server while the project as jar file
>
> > I am deploying my Java application on tibco server and
> > this server has its own log configuration. When I try to
> > write log on this server I have to write separate line
> > of code into each java class I am having.
>
> > So can anybody tell me what exactly is the best way to
> > write logs to a different server log file, when your
> > application will only goes in as a jar file over there.
> > My team is not deploying it onthat server we are just
> > providing the JAR file having logger statements.
>
> First off, if you're only supplying a .jar file, you're not delivering a
> complete webapp, but rather just some (perhaps all) of the classes of the
> webapp.  A webapp consists of more than just classes; consult the servlet
> spec for the additional spec-defined items such as WEB-INF/web.xml.  Also, a
> complete webapp contains a WEB-INF/classes directory, where items such as
> logging configuration files may be placed.
>
> Second, I hope you're using an actual logging facility (such as log4j), not
> just blindly dumping things to System.out or System.err.  All proper logging
> facilities provide for some means of configuring the level of the detail and
> the output location; whoever is creating the full webapp (of which your .jar
> is just a portion) has the responsibility of setting up the logging
> configuration appropriate for the installation.
>
> If you have been lazy and used System.out or System.err for logging, the
> person configuring the complete webapp can set swallowOutput="true" in the
> <Context> element for the webapp.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Thanks and Regards,
--------------------------------------------------------------------------------------------------------------------
Prashant Rajput| Prashant.Rajput.consultant@Nielsen.com
 Off: +91 712 224 5867 Ext 380, +1 301 560 2591 Ext 380,Mob:+91 9561508836
--------------------------------------------------------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message