Re: Appeal to Tomcat developers

2008-10-20 Thread emerson cargnin
Hi Chris


 Configuring Tomcat logging is usually easy: if you accept the default
 configuration, you get catalina.out (stdout), plus some daily-rolled
 files that are all defined in logging.properties. The logging.properties
 file contains configuration and documentation that are helpful if you're
 willing to read through it and connect point A (the named logger like
 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/webappname])
 to the configured logger that includes a filename.

I tried asking this in other posts, but with no sucess. Can you tell
me how to get rid of all log messages in catalina.out (besides the
system.out) and just create a roteable tomcat.log?

I tried the solution at:
http://minaret.biz/tips/tomcatLogging.html#tomcat_5_5_logging
Which is the same as int he log4j section of the
http://tomcat.apache.org/tomcat-5.5-doc/logging.html

What happens for me is that catalina.out will receive all the logs
levels as especified per application, and the tomcat.log will get as
especified in the log4j configuration in the common/classes.

Is there a way to eliminate the log4j messages in the catalina.out?

PS: sorry if I got a bit especific here, just a bit frustrated with
the log in tomcat.

regards
Emerson

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Appeal to Tomcat developers

2008-10-16 Thread André Warnier

Dear Tomcat developers,

this is a humble appeal.
I know I have in the past been over the top on this subject, and for 
that I apologise.


The appeal is about Tomcat logging.

I will venture a few risky bets :
1) for every Tomcat used in a development context, there are 100 used in 
a production environment

2) for every Tomcat developer, there are 1000 Tomcat users
3) for at least 900 out of these 1000 Tomcat users, the current way to 
configure/manage Tomcat logging is too difficult to understand


From earlier Tomcat expert's messages here, I understand that the 
previous logging methods were technically flawed, and that the new 
methods, technically, are far superior.


But from tens of user's messages on this list, it is clear that in terms 
of setup and configuration, the new methods are too complicated, and the 
available documentation is too obscure for most of the Tomcat users that 
are not themselves Java or Tomcat experts.


I realise that this may not be a very exciting subject to work on for a 
Tomcat developer.  Tomcat is a nice package, appreciated by many.
But I fear that the mere complexity of controlling the logging may deter 
a number of users and system administrators from using it, or from 
liking it.  And that is probably not an outcome that any Tomcat 
developer would like either.


I would offer to help, but I can't, because I am not capable of it.  I 
am basically a support and system admin guy in a small company, and I 
handle a dozen systems with several hundred packages on it.  My highest 
Java achievement is a servlet filter, and even there I copied most of 
the lines from examples I found.
Of the dozen Tomcats I handle at the sysadmin level, none are the 
official distribution.  There are many reasons for that, the main one 
being that most of the systems on which we manage applications do not 
belong to us but to customers, and they decide what they install and 
according to which rules.


Basically thus, what I am saying is that 90% of Tomcat sysadmins and 
users have to live with the Tomcat they get, and the Tomcat they get, in 
terms of logging, is not understandable to them, and that it makes them 
uncomfortable.


André



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Johnny Kewl


- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 16, 2008 9:23 AM
Subject: Appeal to Tomcat developers



Dear Tomcat developers,

this is a humble appeal.
I know I have in the past been over the top on this subject, and for 
that I apologise.


The appeal is about Tomcat logging.

I will venture a few risky bets :
1) for every Tomcat used in a development context, there are 100 used in a 
production environment

2) for every Tomcat developer, there are 1000 Tomcat users
3) for at least 900 out of these 1000 Tomcat users, the current way to 
configure/manage Tomcat logging is too difficult to understand


I think you just anti tomcat... you got a bad attitude ;)

You always ask so nicely, how can they refuse you ;)

Andre I feel the same way... Tomcat is magic, but I think the logging sucks.
You on linux, wait till you on windows and the file wont even opne because 
TC is using it.
And files that carry date stamps... makes it difficult to find stuff and 
tell another program to use it, it doesnt even know the name.


The thing that has alway amazed me... we use JMX, we have this complex 
logging engine, but tomcat is a big powerful web server... is it only me, 
but how come that cant be presented as a web page you just address 
/myserver/manager/logs

Or /myserver/manager/JMXStuff

I also think its a missed opportunity... its like you built a ferrari, but 
still use a wheel barrow to go get stuff from the shop... if you know what I 
mean.


... theres probably a good reason for it but yes
+1

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---
If you cant pay in gold... get lost...
http://coolharbor.100free.com/debt/usadebt.htm 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Johnny Kewl


- Original Message - 
From: Johnny Kewl [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 16, 2008 10:01 AM
Subject: Re: Appeal to Tomcat developers




- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 16, 2008 9:23 AM
Subject: Appeal to Tomcat developers



Dear Tomcat developers,

this is a humble appeal.
I know I have in the past been over the top on this subject, and for 
that I apologise.


The appeal is about Tomcat logging.

I will venture a few risky bets :
1) for every Tomcat used in a development context, there are 100 used in 
a production environment

2) for every Tomcat developer, there are 1000 Tomcat users
3) for at least 900 out of these 1000 Tomcat users, the current way to 
configure/manage Tomcat logging is too difficult to understand


BTW Andre, its not just a TC thing, its the whole Java logging thing, its 
unduely complex, so I actually think TC inhereted Java's logging history.
If you know how to make a little singleton, its really is not difficult 
adding a little logging to your servlets, with a tiny little 30 line class.

That also displays as a HTML page... thats what we do...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---
If you cant pay in gold... get lost...
http://coolharbor.100free.com/debt/usadebt.htm 



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Appeal to Tomcat developers

2008-10-16 Thread Peter Crowther
 From: André Warnier [mailto:[EMAIL PROTECTED]
  From earlier Tomcat expert's messages here, I understand that the
 previous logging methods were technically flawed, and that the new
 methods, technically, are far superior.

 But from tens of user's messages on this list, it is clear
 that in terms
 of setup and configuration, the new methods are too
 complicated, and the
 available documentation is too obscure for most of the Tomcat
 users that
 are not themselves Java or Tomcat experts.

What would you change?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Leon Rosenberg
On Thu, Oct 16, 2008 at 2:48 PM, David kerber [EMAIL PROTECTED] wrote:

 For my part, I generally agree with the OP.  Specifically, the show stopper
 for me is that the documentation isn't detailed enough at the level of the
 application and administrator level, and especially doesn't give enough
 examples of the different methods of logging.  I have looked at it
 extensively while reworking the app I inherited, and couldn't easily figure
 out how to configure logging to keep my app's log writes separate from
 Tomcat's without lots of experimentation (which didn't have time for), so I
 just left *everything* going to stdout.  Not the preferred method, I know,
 but how to configure it otherwise was not clear enough for me.

 Dave


I am sorry, but do you always log to system.out in your applications?
Maybe you should take a look at some of numerous logging projects,
starting with
log4j as the most prominent.

http://logging.apache.org/log4j/1.2/index.html

Leon

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Gregor Schneider
Hm, I guess I disagree.

Tomcat is using / supporting the standard logging-features from Java,
and I think this is the way it should be.
If the Java Community decides for a new way of logging, TC may implement it.

For us, we just configure TC to use log4j, and it works like charm.

Sure, it's no out-of-the-box-software and you'll have to read up a
few things, but this is the case for most components (i.e. Hibernate,
Struts etc.).

When talking about real world-applications in the industry, in banks
(a few are still operating), insurance-companies etc., you need a very
specific logging and it should be highly customizable.

Therefore, the given solutions a quite good.

Sure, maybe a bit overloaded for a small company's webapp, however,
they can stick to the default logging behaviour.

Cheers

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Mikolaj Rydzewski

David kerber wrote:
For my part, I generally agree with the OP.  Specifically, the show 
stopper for me is that the documentation isn't detailed enough at the 
level of the application and administrator level, and especially 
doesn't give enough examples of the different methods of logging.  I 
have looked at it extensively while reworking the app I inherited, and 
couldn't easily figure out how to configure logging to keep my app's 
log writes separate from Tomcat's without lots of experimentation 
(which didn't have time for), so I just left *everything* going to 
stdout.  Not the preferred method, I know, but how to configure it 
otherwise was not clear enough for me.
It's not Tomcat's fault. Sometimes you have to deal with webapp that 
uses some custom loggin solution (not to mention System.out). In 
some part it's general Java issue.


What I would like best is possibility to change logging levels (I use 
log4j) on the fly. Using e.g. JMX.


--
Mikolaj Rydzewski [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread David kerber

Leon Rosenberg wrote:

On Thu, Oct 16, 2008 at 2:48 PM, David kerber [EMAIL PROTECTED] wrote:
  

For my part, I generally agree with the OP.  Specifically, the show stopper
for me is that the documentation isn't detailed enough at the level of the
application and administrator level, and especially doesn't give enough
examples of the different methods of logging.  I have looked at it
extensively while reworking the app I inherited, and couldn't easily figure
out how to configure logging to keep my app's log writes separate from
Tomcat's without lots of experimentation (which didn't have time for), so I
just left *everything* going to stdout.  Not the preferred method, I know,
but how to configure it otherwise was not clear enough for me.

Dave




I am sorry, but do you always log to system.out in your applications?
Maybe you should take a look at some of numerous logging projects,
starting with
log4j as the most prominent.

http://logging.apache.org/log4j/1.2/index.html
  
Yes, system.out, and that is my point:  I have looked at the log4j docs 
extensively, and could not figure out how to use it without investing 
more time than I had available.  There either weren't enough practical 
examples, or not enough detailed instructions. 

Essentially I'm agreeing with the OP that either configuring it is too 
complex, or the docs don't make it clear how to do it simply.  I'm not 
sure which is really the problem, but I suspect it's the docs rather 
than the process itself.


D



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread David kerber


Martin Gainty wrote:

logging is as easy with SimpleLog
http://commons.apache.org/logging/commons-logging-1.1.1/guide.html#A%20Quick%20Guide%20To%20Simple%20Log
  

How long as SimpleLog been around?  I don't recall ever seeing it before...

D

or as complex 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

as you configure

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 



  

From: [EMAIL PROTECTED]
To: users@tomcat.apache.org
Subject: Re: Appeal to Tomcat developers
Date: Thu, 16 Oct 2008 10:10:58 +0200


- Original Message - 
From: Johnny Kewl [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 16, 2008 10:01 AM
Subject: Re: Appeal to Tomcat developers



- Original Message - 
From: André Warnier [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 16, 2008 9:23 AM
Subject: Appeal to Tomcat developers


  

Dear Tomcat developers,

this is a humble appeal.
I know I have in the past been over the top on this subject, and for 
that I apologise.


The appeal is about Tomcat logging.

I will venture a few risky bets :
1) for every Tomcat used in a development context, there are 100 used in 
a production environment

2) for every Tomcat developer, there are 1000 Tomcat users
3) for at least 900 out of these 1000 Tomcat users, the current way to 
configure/manage Tomcat logging is too difficult to understand

BTW Andre, its not just a TC thing, its the whole Java logging thing, its 
unduely complex, so I actually think TC inhereted Java's logging history.
If you know how to make a little singleton, its really is not difficult 
adding a little logging to your servlets, with a tiny little 30 line class.

That also displays as a HTML page... thats what we do...





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Leon Rosenberg
On Thu, Oct 16, 2008 at 3:06 PM, David kerber [EMAIL PROTECTED] wrote:
 Leon Rosenberg wrote:

 On Thu, Oct 16, 2008 at 2:48 PM, David kerber [EMAIL PROTECTED]
 wrote:


 For my part, I generally agree with the OP.  Specifically, the show
 stopper
 for me is that the documentation isn't detailed enough at the level of
 the
 application and administrator level, and especially doesn't give enough
 examples of the different methods of logging.  I have looked at it
 extensively while reworking the app I inherited, and couldn't easily
 figure
 out how to configure logging to keep my app's log writes separate from
 Tomcat's without lots of experimentation (which didn't have time for), so
 I
 just left *everything* going to stdout.  Not the preferred method, I
 know,
 but how to configure it otherwise was not clear enough for me.

 Dave



 I am sorry, but do you always log to system.out in your applications?
 Maybe you should take a look at some of numerous logging projects,
 starting with
 log4j as the most prominent.

 http://logging.apache.org/log4j/1.2/index.html


 Yes, system.out, and that is my point:  I have looked at the log4j docs
 extensively, and could not figure out how to use it without investing more
 time than I had available.  There either weren't enough practical examples,
 or not enough detailed instructions.
 Essentially I'm agreeing with the OP that either configuring it is too
 complex, or the docs don't make it clear how to do it simply.  I'm not sure
 which is really the problem, but I suspect it's the docs rather than the
 process itself.

 D


Errm, I'm sorry, but how is that related to tomcat?
Basically you have to add one line to your class to use log4j:

private static Logger log = Logger.getLogger(CurrentClassName.class);

now anywhere in the class just do :
   log.info(message);
   or
   try{
   do_something();
   }catch(Exception e){
  log.error(methodname(+parameters+), e);
   }



You need to more things to configure it properly, one of them is
nearly done automatically, but to be sure just create a context
listener and add to contextinitialization:
DOMConfigurator.configureAndWatch(pathtolog4j.xml)

and now an example for the log4j xml
appender name=ErrorAppender 
class=org.apache.log4j.RollingFileAppender
param name=File value=logs/error.log /
param name=Threshold value=ERROR /
param name=MaxFileSize value=100MB /
param name=MaxBackupIndex value=5 /
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern
value=%r %d{ISO8601} %-5p %c - %m%n/
/layout
/appender

logger name=com.bla.your.package additivity=true
level value=ERROR/
appender-ref ref=ErrorAppender/
/logger

and so on...

read docs on more :-)

Leon








 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread André Warnier

Leon Rosenberg wrote:
[...]


I am sorry, but do you always log to system.out in your applications?
Maybe you should take a look at some of numerous logging projects,
starting with
log4j as the most prominent.

http://logging.apache.org/log4j/1.2/index.html



With utmost respect, Leon, but this is Off-Topic.
(and even more so is you next post)

In my original post (and I apologise if this was not clear enough), I am 
specifically trying to speak for the sysadmin / average Tomcat user, and 
appealing to experts (such as you probably), to help make it simpler for 
these people to use and configure Tomcat. Please.


I have no doubt that for experts, the logging as it is now is probably 
clear, effective, efficient, flexible and everything you would ask for.


log4j is a beautiful package, but it is a monster, requiring deep Java 
knowledge, and even so, many hours of dedicated work to dominate.

From the look of it, Commons Logging is a similar piece of cake.

No doubt that for someone who mainly does Java programming for a living, 
it is worth the effort.
But many (the majority ?) of Tomcat users and administrators do not have 
that time, at least not for that package alone, when they simultaneously 
have to learn a little bit of many other packages.

That does not mean that they don't like Tomcat, at least not yet.

Or else, shall we say up front that Tomcat is a development tool, to be 
used exclusively by Java and Tomcat programming specialists, and not in 
production environments ?





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Stephen Caine

Andre,

In regards to contacting IS people (not developers or specialists) who  
use Tomcat in production environments, please contact me off-list.  I  
think I can help to point  you in the right direction and get you  
access to the resources you are requesting.


Thank you,

Stephen Caine
CommonGround Softworks, Inc.
[EMAIL PROTECTED]


In my original post (and I apologise if this was not clear enough),  
I am specifically trying to speak for the sysadmin / average Tomcat  
user, and appealing to experts (such as you probably), to help make  
it simpler for these people to use and configure Tomcat. Please.


I have no doubt that for experts, the logging as it is now is  
probably clear, effective, efficient, flexible and everything you  
would ask for.


log4j is a beautiful package, but it is a monster, requiring deep  
Java knowledge, and even so, many hours of dedicated work to dominate.

From the look of it, Commons Logging is a similar piece of cake.

No doubt that for someone who mainly does Java programming for a  
living, it is worth the effort.
But many (the majority ?) of Tomcat users and administrators do not  
have that time, at least not for that package alone, when they  
simultaneously have to learn a little bit of many other packages.

That does not mean that they don't like Tomcat, at least not yet.

Or else, shall we say up front that Tomcat is a development tool, to  
be used exclusively by Java and Tomcat programming specialists, and  
not in production environments ?





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Leon Rosenberg
On Thu, Oct 16, 2008 at 3:42 PM, André Warnier [EMAIL PROTECTED] wrote:
 Leon Rosenberg wrote:
 [...]

 I am sorry, but do you always log to system.out in your applications?
 Maybe you should take a look at some of numerous logging projects,
 starting with
 log4j as the most prominent.

 http://logging.apache.org/log4j/1.2/index.html


 With utmost respect, Leon, but this is Off-Topic.
 (and even more so is you next post)

yes, it is, it was a reply to an off-topic post by david :-) but it's
still OT, so please accept my apologies.


 In my original post (and I apologise if this was not clear enough), I am
 specifically trying to speak for the sysadmin / average Tomcat user, and
 appealing to experts (such as you probably), to help make it simpler for
 these people to use and configure Tomcat. Please.

well our (100 employees company with about 20 tomcats in production
environment and many thousands of users online just as we speak)
admins are well able to configure tomcat logging as they wish (mainly
by using log4j configs we (developers) create and
redirecting them to the syslog (an appender in log4j writing to syslog).
They are no java experts and actually have no java or development
background, but with some time invested in googling or asking people
on lists / irc, they manage their tasks.


 I have no doubt that for experts, the logging as it is now is probably
 clear, effective, efficient, flexible and everything you would ask for.

 log4j is a beautiful package, but it is a monster, requiring deep Java
 knowledge, and even so, many hours of dedicated work to dominate.
 From the look of it, Commons Logging is a similar piece of cake.

not really. you need about 15 minutes to start using log4j. Of course
deep understanding and tuned configuration will require more time.


 No doubt that for someone who mainly does Java programming for a living, it
 is worth the effort.
 But many (the majority ?) of Tomcat users and administrators do not have
 that time, at least not for that package alone, when they simultaneously
 have to learn a little bit of many other packages.
 That does not mean that they don't like Tomcat, at least not yet.

 Or else, shall we say up front that Tomcat is a development tool, to be used
 exclusively by Java and Tomcat programming specialists, and not in
 production environments ?

I would doubt that the majority of tomcat users (i.e. java developers)
can't use logging. Its one of the first thing you need to learn on the
way to become professional java developer.
As for administrators, they (at least those who understand their
profession) are used to read docs and tomcat logging is well
documented. Besides, why would they be interested in tomcat logs, it
just works and ogs are empty in production environment (at least they
should be  :-)))

regards
Leon


P.S. the time you invested in this thread would probably be sufficient
to learn to use log4j ;-)

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Mark H. Wood
On Thu, Oct 16, 2008 at 10:01:30AM +0200, Johnny Kewl wrote:
 The thing that has alway amazed me... we use JMX, we have this complex 
 logging engine, but tomcat is a big powerful web server... is it only me, 
 but how come that cant be presented as a web page you just address 
 /myserver/manager/logs

Because it is waiting for YOU to write it?

-- 
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Typically when a software vendor says that a product is intuitive he
means the exact opposite.



pgpiNkIPIPa0f.pgp
Description: PGP signature


Re: Appeal to Tomcat developers

2008-10-16 Thread Mark H. Wood
There is simple, and then there is SIMPLE.

The typical daemon has ONE LINE for logging configuration:  log file
goes there.  Some might have one line for the error log and another
for an activity log.  Some might let you say whether to use syslog or
files.  If you supply NO configuration, it will probably do something
totally unsurprising and reasonably useful anyway.

Java app.s, on the other hand, tend to have multiple layers of log
abstractions and may very well have dozens or hundreds of lines, in
(a) separate configuration file(s), just to describe logging.  It's
great for debugging but hell for the poor sysadmin who only wants to
say put the log file there.

I think that's what is being asked: there should be *one page* that
begins with *everything you need to know* in order to say, put the
log file there.  Just that.  After that, it's appropriate to point
out that much more subtle arrangements are available, and when you
want more, come back, here are pointers to all the hairy details.

-- 
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Typically when a software vendor says that a product is intuitive he
means the exact opposite.



pgpCKJcRygYZj.pgp
Description: PGP signature


RE: Appeal to Tomcat developers

2008-10-16 Thread Martin Gainty

logging is as easy with SimpleLog
http://commons.apache.org/logging/commons-logging-1.1.1/guide.html#A%20Quick%20Guide%20To%20Simple%20Log
or as complex 
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
as you configure

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: Appeal to Tomcat developers
 Date: Thu, 16 Oct 2008 10:10:58 +0200
 
 
 - Original Message - 
 From: Johnny Kewl [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, October 16, 2008 10:01 AM
 Subject: Re: Appeal to Tomcat developers
 
 
 
  - Original Message - 
  From: André Warnier [EMAIL PROTECTED]
  To: Tomcat Users List users@tomcat.apache.org
  Sent: Thursday, October 16, 2008 9:23 AM
  Subject: Appeal to Tomcat developers
 
 
  Dear Tomcat developers,
 
  this is a humble appeal.
  I know I have in the past been over the top on this subject, and for 
  that I apologise.
 
  The appeal is about Tomcat logging.
 
  I will venture a few risky bets :
  1) for every Tomcat used in a development context, there are 100 used in 
  a production environment
  2) for every Tomcat developer, there are 1000 Tomcat users
  3) for at least 900 out of these 1000 Tomcat users, the current way to 
  configure/manage Tomcat logging is too difficult to understand
 
 BTW Andre, its not just a TC thing, its the whole Java logging thing, its 
 unduely complex, so I actually think TC inhereted Java's logging history.
 If you know how to make a little singleton, its really is not difficult 
 adding a little logging to your servlets, with a tiny little 30 line class.
 That also displays as a HTML page... thats what we do...
 
 ---
 HARBOR : http://www.kewlstuff.co.za/index.htm
 The most powerful application server on earth.
 The only real POJO Application Server.
 See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
 ---
 If you cant pay in gold... get lost...
 http://coolharbor.100free.com/debt/usadebt.htm 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

_
You live life beyond your PC. So now Windows goes beyond your PC.
http://clk.atdmt.com/MRT/go/115298556/direct/01/

Re: Appeal to Tomcat developers

2008-10-16 Thread David kerber

Mark H. Wood wrote:

There is simple, and then there is SIMPLE.

The typical daemon has ONE LINE for logging configuration:  log file
goes there.  Some might have one line for the error log and another
for an activity log.  Some might let you say whether to use syslog or
files.  If you supply NO configuration, it will probably do something
totally unsurprising and reasonably useful anyway.

Java app.s, on the other hand, tend to have multiple layers of log
abstractions and may very well have dozens or hundreds of lines, in
(a) separate configuration file(s), just to describe logging.  It's
great for debugging but hell for the poor sysadmin who only wants to
say put the log file there.

I think that's what is being asked: there should be *one page* that
begins with *everything you need to know* in order to say, put the
log file there.  Just that.  After that, it's appropriate to point
out that much more subtle arrangements are available, and when you
want more, come back, here are pointers to all the hairy details.

  
Thank you! for the succinct description of what I've been trying (and 
failing miserably) to get across.


D



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Appeal to Tomcat developers

2008-10-16 Thread Peter Crowther
I think there's a miscommunication going on.

 From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
 well our [...]
 admins are well able to configure tomcat logging as they wish (mainly
 by using log4j configs we (developers) [...]).

OK.  So your admins have in-house developers to turn to.

[...]
 I would doubt that the majority of tomcat users (i.e. java developers)
[...]

Andre's original premise is that the majority of Tomcat users are *not* Java 
developers.  They are, instead, people who have a webapp they need to run and 
maintain.  They have downloaded Tomcat in order to run it.

I agree with Andre.  I think his 90% estimate is high, but I suspect pure 
admins are in the majority.  Certainly I think equating tomcat user with 
java developer is naïve.

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread André Warnier

Mark H. Wood wrote:
[...] good stuff



I think that's what is being asked: there should be *one page* that
begins with *everything you need to know* in order to say, put the
log file there.  Just that.  After that, it's appropriate to point
out that much more subtle arrangements are available, and when you
want more, come back, here are pointers to all the hairy details.



*YES*
Thank you.

That's what I mean with a (revisited) Logger element :
have some simple attributes in it, similar to the former Tomcat 4.1 
Logger, for a simple configuration.
Then add a couple of attributes of the delegate to variety, for anyone 
who wants to make it more complicated, delicate, fine-tuned, whatever.


Then give the possibility to copy and modify this Logger, and insert 
it into each webapp's web.xml or context.xml, to say now this one logs 
some other way.  But if I remove this Logger from the webapp config, 
then it reverts to logging like its papa.


I have no idea if this would be difficult, or if this is even possible 
or allowed with respect to Java or Servlet specs, but that's the idea, 
and it would be great for us Tomcat dummies if it was.


Alternatively, maybe something can be done in the docs, but the problem 
would remain for guys like me who get the Tomcat that's there, just 
want to add this one small webapp, and please-also-clean-up-the-logs, 
and have to figure out what the hell this is all about.


I have another point to add : maybe I understand this wrong, but it 
seems that with the current implementation, a webapp is able to decide 
where and how it logs, no matter what the overall server configuration 
says.  And that seems to me like the tail wagging the dog.

But again, maybe I just don't understand how it works. I admit I don't.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Mark Thomas
André Warnier wrote:
 Mark H. Wood wrote:
 [...] good stuff
 

 I think that's what is being asked: there should be *one page* that
 begins with *everything you need to know* in order to say, put the
 log file there.  Just that.  After that, it's appropriate to point
 out that much more subtle arrangements are available, and when you
 want more, come back, here are pointers to all the hairy details.

 
 *YES*
 Thank you.
 
 That's what I mean with a (revisited) Logger element :
 have some simple attributes in it, similar to the former Tomcat 4.1
 Logger, for a simple configuration.
 Then add a couple of attributes of the delegate to variety, for anyone
 who wants to make it more complicated, delicate, fine-tuned, whatever.

I don't think the logger element is going to make a return. However, the
current configuration system isn't that different in terms of what it lets
you do and allows the control you are looking for although it is more
verbose and the docs could do a lot more to make things clearer.

 Then give the possibility to copy and modify this Logger, and insert
 it into each webapp's web.xml or context.xml, to say now this one logs
 some other way.  But if I remove this Logger from the webapp config,
 then it reverts to logging like its papa.

Replace Logger .../ element with a logging.properties file and this
functionality exists now.

 I have no idea if this would be difficult, or if this is even possible
 or allowed with respect to Java or Servlet specs, but that's the idea,
 and it would be great for us Tomcat dummies if it was.

I think, and please tell me if I am wrong, that what is missing is a simple
guide to what goes in logging.properties. The current docs dive into the
deep end without covering the simple stuff first.

 Alternatively, maybe something can be done in the docs, but the problem
 would remain for guys like me who get the Tomcat that's there, just
 want to add this one small webapp, and please-also-clean-up-the-logs,
 and have to figure out what the hell this is all about.

Improving / restructuring / re-ordering / adding to / deleting from the
content in http://tomcat.apache.org/tomcat-6.0-doc/logging.html is all
possible.

What would be useful is if you started a wiki page and set out the
structure you would like to see. Don't worry about the content. I or
someone else who knows the details can fill that in later. If you haven't
already found them the following might give you some ideas:
http://wiki.apache.org/tomcat/FAQ/Logging
http://wiki.apache.org/tomcat/Logging_Tutorial
in addition to the standard docs at
http://tomcat.apache.org/tomcat-6.0-doc/logging.html

 I have another point to add : maybe I understand this wrong, but it
 seems that with the current implementation, a webapp is able to decide
 where and how it logs, no matter what the overall server configuration
 says.  And that seems to me like the tail wagging the dog.
 But again, maybe I just don't understand how it works. I admit I don't.

I think this is the root of the issue. Each web application is free to use
any logging framework it likes. Tomcat has no control over the logging
framework - if any - that a web application may use. In the worst case,
each web application may use a different logging framework. Clearly this
creates a nightmare for a system admin trying to figure out how logging
works for each webapp. I think there are two ways to solve this problem,
neither of them technical. The first is set an organisation wide policy as
to which framework should be used. The alternative is require developers to
provide documentation with their web app that explains how logging is to be
configured for that application.

If you do help out and start a wiki page then maybe you could include a
section on web app logging and how to handle the common approaches:
- write everything to stdout
- log4j
- java.util.logging
- commons-logging

Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mark,

Mark Thomas wrote:
 André Warnier wrote:
 I have another point to add : maybe I understand this wrong, but it
 seems that with the current implementation, a webapp is able to decide
 where and how it logs, no matter what the overall server configuration
 says.  And that seems to me like the tail wagging the dog.
 But again, maybe I just don't understand how it works. I admit I don't.
 
 I think this is the root of the issue. Each web application is free to use
 any logging framework it likes. Tomcat has no control over the logging
 framework - if any - that a web application may use.

I'd like to point out that when you are configuring logging for Tomcat,
you're configuring /logging for Tomcat/, not for your applications. Yes,
Tomcat does perform some logging on behalf of the application (things
like auto-redeployment notices, webapp startup info, libraries loading,
etc.) but Tomcat does not dictate any of the application-specific logs
that you create.

I'll give you an analogy with Apache httpd and maybe you can see what I
mean.

Let's say you have a PHP-based application running on Apache httpd. In
httpd.conf, you have something like

AccessLog /var/log/apache/access.log common

This will log all HTTP accesses to the access.log file. Simple.

On the other hand, your application may maintain its own log file in
/var/log/myphpapp/errors.log. In that case, there is no way at all for
an administrator to configure logging for your application using httpd.conf.

The same is true for configuring application versus server logging in
TC: logging.properties (and friends) configure the logging for the
application server, and the application is free to do whatever it wants
for application-specific logging.

I think this logging issue is really big for folks moving from servers
like httpd where logging is typically very simple (log errors or
accesses, etc.). For those of us who have used Java-based logging
systems in the past, this is a piece of cake.

For instance, I have used log4j for years and years. log4j requires a
log4j.properties file (or you can do it programmatically, but that
sucks) for configuration. It's pretty simple: you define an appender
(basically a message log target), give it a file name and a log level
and then, in your code, you simply write to it. That's it.

The complexity comes in when you want multiple appenders at different
levels and you want different parts of your code (say, all org.apache.*
stuff goes to one logger and com.mycompany.* goes to another). It's not
really any harder to understand... it's just more of the same kind of
configuration. And, the plus side is that your code doesn't get any more
complex.

Since each application can be configured differently (from inside the
application, that is), you have to ignore them when you're talking about
server logging. TC simply isn't going to say hey, webappX, your log
file is /here/. The application itself makes that decision.

Configuring Tomcat logging is usually easy: if you accept the default
configuration, you get catalina.out (stdout), plus some daily-rolled
files that are all defined in logging.properties. The logging.properties
file contains configuration and documentation that are helpful if you're
willing to read through it and connect point A (the named logger like
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/webappname])
to the configured logger that includes a filename.

The stock logging.properties contains configuration for, say, the
'manager' application. Want to create a new logger for your new
application? Simply copy that configuration and modify the appropriate
parts (one of them being the name of the logger itself, which is
3manager.org.apache.juli.FileHandler for me, and could probably have
been given a more pronounceable name, but captures exactly what that
logger is for).

I hope that helps a bit more.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj3cQ0ACgkQ9CaO5/Lv0PAEpQCgtfdK7sSQ/KUgC13XucfGWZIX
avgAn1qSCVodcDv2cDTu+EHlZjdabGsp
=VQvK
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Appeal to Tomcat developers

2008-10-16 Thread André Warnier

Christofer, Mark and others,

I have read, collected, and will re-read, the answers I got this time.
I appreciate them, because they are informative, and you took the time
and pain to answer this in a way I can (at least in part) understand.

Other people, in various ways, made the point better than I did, that
there is a difference between a place where there are enough sysadmins
that one or two can dedicate themselves to Java logging, and enough Java
programmers to fall back to in case of problems, and where all web
applications are written in heaven according to strict rules, and a 
place like the one I work at, which is anything but.

A bit like the old joke with the demo hell and the real one.

From the mail I am seeing, on and off-list, I gather that this is an 
exercise worth doing, not only for myself.


I understand (now) the point made about the difference between
Tomcat logging and the application's logging. The Apache/PHP comparison
of Christopher was very informative.
In my opinion, this point is not made clearly enough in the Tomcat 
logging documentation.
There are also some items in that respect that are confusing in the 
documentation and in the properties file, because they seem to indicate 
the opposite. That is, to me and now, and maybe a bit more information 
will clear up the confusion.


In my naiveté, I thought that Commons Logging meant : provide a single
interface to applications for logging (a bit like system.out), and
decide outside of the application what underlying system this uses and
where it goes.  (Maybe it is that, but that point then I haven't gotten
clearly yet).  I also thought or hoped, this being in the realm of 
Java's object-oriented and inheritance nature, that it worked like class

inheritance. Don't find the method here? go one level up, that kind of
thing.

But, unless I am mistaken again, it looks like my hope of channeling all
webapps, no matter where they came from, into writing their logs into
my logfile, using my main logging.properties file that I 
understand, is forlorn. Or is it not, or not entirely ?


Now, I would like to quote in extenso the last post from Christopher, 
and make some comments about what I think is clear or not.
Not that this would be misinterpreted, I am just using some levity below 
not in a sarcastic way, but to express what I think a Tomcat and webapp 
mere installer like me can be expected to know or not.


Start quote

I'd like to point out that when you are configuring logging for Tomcat,
you're configuring /logging for Tomcat/, not for your applications. Yes,
Tomcat does perform some logging on behalf of the application (things
like auto-redeployment notices, webapp startup info, libraries loading,
etc.) but Tomcat does not dictate any of the application-specific logs
that you create.

++
Very clear now, and wasn't so clear before.
Not nitpicking, but I'd like to point out that I don't create the logs, 
its the applications that done it.  I just see the logfiles popping up, 
I don't know what is in the applications to make these logfiles pop up 
and I mostly cannot look inside.

++

I'll give you an analogy with Apache httpd and maybe you can see what I
mean.

Let's say you have a PHP-based application running on Apache httpd. In
httpd.conf, you have something like

AccessLog /var/log/apache/access.log common

This will log all HTTP accesses to the access.log file. Simple.

On the other hand, your application may maintain its own log file in
/var/log/myphpapp/errors.log. In that case, there is no way at all for
an administrator to configure logging for your application using httpd.conf.

++
True, very clear, and understand the parallel with Tomcat apps, now.
But this is not clear at all when reading the Tomcat on-line docs, and I 
think that alone creates a lot of confusion.

++

The same is true for configuring application versus server logging in
TC: logging.properties (and friends) configure the logging for the
application server, and the application is free to do whatever it wants
for application-specific logging.

++
From an administrator's point of view, that's a pity, in my opinion. 
But I don't know how to summarise correctly why I believe it's a pity, 
so I'll leave that for later.

++

I think this logging issue is really big for folks moving from servers
like httpd where logging is typically very simple (log errors or
accesses, etc.).

++
True, and that is what we sysadmins are longing for.  But we do  not 
receive Tomcat that way, so we have to figure out if it is possible to 
make it be that way.

++

 For those of us who have used Java-based logging
systems in the past, this is a piece of cake.

++
I believe you.  But for those of us who have not spent years using Java 
logging, it isn't a piece of cake, hence my plea.
Have you ever seen the Rosetta Stone ? That's the tablet that allowed 
Champollion to start deciphering Egyptians hieroglyphs. Of course, that 
was only because he already knew egyptian demotic