RE: Multiple threads that log events to the same file concurrently

2006-10-25 Thread Cohen Oren \(ICS\)
Thanks again Curt for your quick response. 

1) The AsyncAppender buffer is a queue (FIFO), with lots of appending at
its beginning, and one Dispatcher that gets the events from the other
side. That's the reason I thought that LinkedList would be best. Since
I'm working with many threads, I set the buffer size to 200,000 and then
I reduced it to 20,000. I set it to such a big number because I didn't
want to lose too much events (I'm now in block=false). However, I guess
that if the implementation is ArrayList and my buffer is so big, then
the performance will be poor. If I set the buffer size too small, I will
lose many events (that will only be counted and summerized, instead of
being logged).
Do you have any recommendation for the maximum buffer size ?

2) I read that when using AsyncAppender, it is better to set the
LocationInfo to false because otherwise, I'll miss the whole purpose
of improving performance. Well I did that, but then I got the
NullPointerException... I have no choice but to remove the %C and %L
from the pattern, right ?

Thanks !


-Original Message-
From: Curt Arnold [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 24, 2006 6:30 PM
To: Log4J Users List
Subject: Re: Multiple threads that log events to the same file
concurrently


On Oct 24, 2006, at 3:59 AM, Cohen Oren (ICS) wrote:

 Thanks !

 1) Is there a reason why the buffer of the AsyncAppender is 
 implemented as ArrayList and not LinkedList ?

I don't believe there has been any performance testing related to the
choice of List implementation in this instance.  Section 8.4.4 of Java
Platform Performance says:

 Most of the time you need a List, the ArrayList implementation is the 
 best choice.  ArrayList offers constant-time positional access and is 
 quite fast,  It doesn't have to allocate a node object for each 
 element in the List and it uses the native method System.arraycopy to 
 move multiple elements simultaneously.  ...
 ...

 You might want to consider using LinkedList if you frequently add 
 elements to the beginning of the List or iterate over the list and 
 delete elements from the interior.  ... However, keep in mind that 
 this performance gain might be more than offset by other factors.  ...

 The fixed overhead for LinkedList operations is also much greater than

 for ArrayList operations.

AsyncAppender does not do any of the things that might suggest using
LinkedList while it does do things (like bulk copies) that ArrayList is
better at.



 2) I tried to ran on log4j 1.2.14 with the following configuration, 
 and got a NullPointerException (see below).
 If my LocationInfo was set to false, why did the Dispatcher get into
 getLocationInformation() method ?

The pattern layout attached to the rolling file appender contains %C and
%L specifiers (for the class name and line number, respectively), so
when the event is finally handled by the appender, it tries to collect
location information from the current call stack (which will no longer
contain the location of the call since the event has been delegated to
another thread).  There appears to be a bug in location capturing code
when the call stack does not include the expected logger class.  I'm
guessing the same problem would also occur with earlier versions of
log4j.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



chainsaw: log file via http does not refresh

2006-10-25 Thread kern david
Hi,

I'm trying to monitor an application with chainsaw, and the only way for us to
expose the log file is via http.
I managed to add receivers to get the file (tried LogFilePatternReceiver and
VFSLogFilePatternReceiver), but with none of them is chainsaw refreshing the
view, getting the lines I continually add to my log file.
My config is like this:

file url: http://localhost:8080/path/to/file.log
filter expression: empty
log format: LEVEL *TIMESTAMP LOGGER - MESSAGE
name: don't care it's random
tailing: true
timestamp format: -MM-d HH:mm:ss,SSS

this works for getting the file and everything, but it is not refreshed although
tailing is set to true.

What am I doing wrong?

I'm on Windows, and my .plugins directory contains (more than I need I think):
commons-codec-1.3.jar
commons-httpclient-3.0.1.jar
commons-logging-1.1.jar
commons-logging-adapters-1.1.jar
commons-logging-api-1.1.jar
commons-net-1.4.1.jar
commons-vfs-20060929.jar
jakarta-oro-2.0.8.jar
log4j-chainsaw-vfs.jar

So what can I do to make it work? Is it possible?

Thanks,

David.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Log file per application execution

2006-10-25 Thread Chris Dillon
Thanks for your quick answer Curt, but after reading the thread, it kinds of
seems an overkill compared to (1) my knowledge of log4j and (2) the time I can
spend on it... (plus I'm using log4j 1.2.14 , not 1.3... ). 

I was more wandering if such an Appender already existed or if a quick hack
could do...

For my perculiar case, it seems to me that the required file processing just
have to occur once on startup (check if file exist, if so, back it up
(optionnaly check number of backups and clear a couple... )).
So as a quick hack, I subclassed the FileAppender and overrid the
activateOptions() to check for backups. 

I does the job for me, backs up the files from xxx.log to xxx.log.1 up to a
certain number of backups, then deletes the older ones.

The code is far from beautiful (then again, I've seen worse ;D ), but should
anyone be interrested, just drop me an email...

Cheers
Chris






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: chainsaw: log file via http does not refresh

2006-10-25 Thread Scott Deboy
I haven't seen the current 'tail' functionality work anywhere but on a local 
Windows hard drive.

'Tail' functionality can be implemented in VFSLogFilePatternReceiver, but some 
code changes are needed (use VFS's random access file support).

Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:  503.224.7496
Cell:   503.997.1367
Fax:503.222.0185

[EMAIL PROTECTED]

www.comotivsystems.com



-Original Message-
From: news on behalf of kern david
Sent: Wed 10/25/2006 2:56 AM
To: log4j-user@logging.apache.org
Subject:  chainsaw: log file via http does not refresh
 
Hi,

I'm trying to monitor an application with chainsaw, and the only way for us to
expose the log file is via http.
I managed to add receivers to get the file (tried LogFilePatternReceiver and
VFSLogFilePatternReceiver), but with none of them is chainsaw refreshing the
view, getting the lines I continually add to my log file.
My config is like this:

file url: http://localhost:8080/path/to/file.log
filter expression: empty
log format: LEVEL *TIMESTAMP LOGGER - MESSAGE
name: don't care it's random
tailing: true
timestamp format: -MM-d HH:mm:ss,SSS

this works for getting the file and everything, but it is not refreshed although
tailing is set to true.

What am I doing wrong?

I'm on Windows, and my .plugins directory contains (more than I need I think):
commons-codec-1.3.jar
commons-httpclient-3.0.1.jar
commons-logging-1.1.jar
commons-logging-adapters-1.1.jar
commons-logging-api-1.1.jar
commons-net-1.4.1.jar
commons-vfs-20060929.jar
jakarta-oro-2.0.8.jar
log4j-chainsaw-vfs.jar

So what can I do to make it work? Is it possible?

Thanks,

David.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread James Stauffer

Can you turn on log4j debugging (set log4j.debug system property to
true)?  That might help determine the cause.

On 10/25/06, Adilson Dias da Silva [EMAIL PROTECTED] wrote:

Hi,
I and the fellows from the host admin are facing with a following situation:
myApp doesn't create a log file whem running in the host's tomcat server
(virtual host), but is OK whem running in a tomcat localhost.
I have tested the same address used on log4j.xml, creating a file in the
directory (/home/.../domains/myApp/logs/ ) and was created fine.
I have migrate to tomcat from jboss by the same reason, and in the jboss  i
have used the jboss soluction for RepositorySelector (
http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector ) without
success.
I have the log4j-1.2.13.jar in the WEB-INF/lib directory of myApp and
assumed that this approach in tomcat would provide a similar behavior to
using Repository Selector.
I have searched for threads in this mailing without success.
I will appreciate any help.
Thanks.


Adilson Dias da Silva (BR)  * * *
Sê plural como o universo.
Pensamentos - Fernando Pessoa
***





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple threads that log events to the same file concurrently

2006-10-25 Thread Curt Arnold


On Oct 25, 2006, at 2:57 AM, Cohen Oren (ICS) wrote:


Thanks again Curt for your quick response.

1) The AsyncAppender buffer is a queue (FIFO), with lots of  
appending at

its beginning, and one Dispatcher that gets the events from the other
side.


As rewritten in log4j 1.2.14, the dispatch thread gets a snapshot of  
the entire pending event queue, clears the queue and then works  
through its local array of the events from the queue.  It does not  
remove an event at a time from the start of the queue.




That's the reason I thought that LinkedList would be best. Since
I'm working with many threads, I set the buffer size to 200,000 and  
then

I reduced it to 20,000. I set it to such a big number because I didn't
want to lose too much events (I'm now in block=false). However, I  
guess

that if the implementation is ArrayList and my buffer is so big, then
the performance will be poor.


The bufferSize is never used to set the size of the ArrayList, it is  
only used to limit how large it can grow.  Setting a large value for  
the buffer size will not immediately cost you memory, it will only  
cost you memory when you start needing to have that many items in the  
queue.  Depending on how large your queue grows, you may become  
sluggish or you may exhaust the heap space and start getting out of  
memory exceptions.




If I set the buffer size too small, I will
lose many events (that will only be counted and summerized, instead of
being logged).
Do you have any recommendation for the maximum buffer size ?



The default value is 128, but that is a holdover from the old  
design.  It is probably not a bad default, but it depends on the  
nature of your application.  For you to hit that limit, you would  
have to have a bursty section that makes logging requests roughly 128  
times faster than your underlying appender can handle it or your  
application consistently is making logging requests faster than the  
underlying appender can process.





2) I read that when using AsyncAppender, it is better to set the
LocationInfo to false because otherwise, I'll miss the whole purpose
of improving performance. Well I did that, but then I got the
NullPointerException... I have no choice but to remove the %C and %L
from the pattern, right ?



Collecting the information to provide the class and line number is  
expensive and must be done on the thread that made the logging  
request.  The %C and %L should not have thrown a NullPointerException  
as you configured them, but they would never be able to give you the  
class name and line number but should have given you a '?' to  
indicate that the information was not available.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Logging Cross Functional categories in log4j

2006-10-25 Thread GoodOne

Hello All,
This is my first posting so please bear with me.

I am using log4j and I would like to log based on technical and functional
partitions of the application so that I can filter logs later.
So technical partition would include EJB, Persistence, Servlet, BusinessTier
etc while functional partition could include
Accounts,Servicing,Plan,Infrastructure etc.

One idea is I could take a cartesian product as categories.
Any other ideas are welcome.

Thank you.
The Good one.


Re: Logging Cross Functional categories in log4j

2006-10-25 Thread James Stauffer

One good option: use loggers based on the class name as normal and set
MDC values for the technical and functional partitions.

On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:

Hello All,
 This is my first posting so please bear with me.

I am using log4j and I would like to log based on technical and functional
partitions of the application so that I can filter logs later.
So technical partition would include EJB, Persistence, Servlet, BusinessTier
etc while functional partition could include
Accounts,Servicing,Plan,Infrastructure etc.

One idea is I could take a cartesian product as categories.
Any other ideas are welcome.

Thank you.
The Good one.





--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [SPAM (Bayesain Analysis)] - Logging Cross Functional categories in log4j - Bayesian Filter detected spam

2006-10-25 Thread Bender Heri
Already considered to use MDC? 

i.e.:

MDC.put( category_tech, EJB )
MDC.put( category_func, Plan )
try
{
myLog.x
}
finally
{
   MDC.remove( category_tech );
   MDC.remove( category_func );
}

The pattern can resolve this MDC values with the %X switch: %X{category_tech} 
%X{category_func}

Heri

 -Original Message-
 From: GoodOne [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 25, 2006 6:54 PM
 To: Log4J Users List
 Subject: [SPAM (Bayesain Analysis)] - Logging Cross Functional
 categories in log4j - Bayesian Filter detected spam
 
 
 Hello All,
  This is my first posting so please bear with me.
 
 I am using log4j and I would like to log based on technical 
 and functional
 partitions of the application so that I can filter logs later.
 So technical partition would include EJB, Persistence, 
 Servlet, BusinessTier
 etc while functional partition could include
 Accounts,Servicing,Plan,Infrastructure etc.
 
 One idea is I could take a cartesian product as categories.
 Any other ideas are welcome.
 
 Thank you.
 The Good one.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Cross Functional categories in log4j

2006-10-25 Thread GoodOne

Thank you. But if I want to change the debug level in config file for all
EJBs across all functional partitions, would it be possible if i use MDC
values?



On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:


One good option: use loggers based on the class name as normal and set
MDC values for the technical and functional partitions.

On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:
 Hello All,
  This is my first posting so please bear with me.

 I am using log4j and I would like to log based on technical and
functional
 partitions of the application so that I can filter logs later.
 So technical partition would include EJB, Persistence, Servlet,
BusinessTier
 etc while functional partition could include
 Accounts,Servicing,Plan,Infrastructure etc.

 One idea is I could take a cartesian product as categories.
 Any other ideas are welcome.

 Thank you.
 The Good one.




--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Logging Cross Functional categories in log4j

2006-10-25 Thread Jacob Kjome

You can get that sort of behavior using an MDC based filters on various
appenders.  There was a thread about a week ago or so that suggested allowing
for a custom class to be configured for a logger which would provide custom
criteria to determine if a level is enabled.  Of course, this is not reality at
this point.  Maybe Log4j-2.0.

Jake

Quoting GoodOne [EMAIL PROTECTED]:

 Thank you. But if I want to change the debug level in config file for all
 EJBs across all functional partitions, would it be possible if i use MDC
 values?



 On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:
 
  One good option: use loggers based on the class name as normal and set
  MDC values for the technical and functional partitions.
 
  On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:
   Hello All,
This is my first posting so please bear with me.
  
   I am using log4j and I would like to log based on technical and
  functional
   partitions of the application so that I can filter logs later.
   So technical partition would include EJB, Persistence, Servlet,
  BusinessTier
   etc while functional partition could include
   Accounts,Servicing,Plan,Infrastructure etc.
  
   One idea is I could take a cartesian product as categories.
   Any other ideas are welcome.
  
   Thank you.
   The Good one.
  
  
 
 
  --
  James Staufferhttp://www.geocities.com/stauffer_james/
  Are you good? Take the test at http://www.livingwaters.com/good/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [SPAM (Bayesain Analysis)] - Logging Cross Functional categories in log4j - Bayesian Filter detected spam

2006-10-25 Thread GoodOne

Thank you. But if I want to change the debug level in config file for EJBs
across all functional partitions like Accounts,Servicing,Plan,Infrastructure
etc, would it be possible if i use MDC values?


On 10/25/06, Bender Heri [EMAIL PROTECTED] wrote:


Already considered to use MDC?

i.e.:

MDC.put( category_tech, EJB )
MDC.put( category_func, Plan )
try
{
   myLog.x
}
finally
{
  MDC.remove( category_tech );
  MDC.remove( category_func );
}

The pattern can resolve this MDC values with the %X switch:
%X{category_tech} %X{category_func}

Heri

 -Original Message-
 From: GoodOne [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 25, 2006 6:54 PM
 To: Log4J Users List
 Subject: [SPAM (Bayesain Analysis)] - Logging Cross Functional
 categories in log4j - Bayesian Filter detected spam


 Hello All,
  This is my first posting so please bear with me.

 I am using log4j and I would like to log based on technical
 and functional
 partitions of the application so that I can filter logs later.
 So technical partition would include EJB, Persistence,
 Servlet, BusinessTier
 etc while functional partition could include
 Accounts,Servicing,Plan,Infrastructure etc.

 One idea is I could take a cartesian product as categories.
 Any other ideas are welcome.

 Thank you.
 The Good one.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Logging Cross Functional categories in log4j

2006-10-25 Thread Bender Heri
You can write your own Filter class where you can use your MDC value. Filter 
classes are not supported in Property configuration, only in XML configuration.
Heri

 -Original Message-
 From: GoodOne [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 25, 2006 7:58 PM
 To: Log4J Users List
 Subject: [SPAM (Keyword Checking)] - Re: [SPAM (Bayesain Analysis)] -
 Logging Cross Functional categories in log4j - Bayesian Filter
 detected spam - Found word(s) remove list in the Text body
 
 
 Thank you. But if I want to change the debug level in config 
 file for EJBs
 across all functional partitions like 
 Accounts,Servicing,Plan,Infrastructure
 etc, would it be possible if i use MDC values?
 
 
 On 10/25/06, Bender Heri [EMAIL PROTECTED] wrote:
 
  Already considered to use MDC?
 
  i.e.:
 
  MDC.put( category_tech, EJB )
  MDC.put( category_func, Plan )
  try
  {
 myLog.x
  }
  finally
  {
MDC.remove( category_tech );
MDC.remove( category_func );
  }
 
  The pattern can resolve this MDC values with the %X switch:
  %X{category_tech} %X{category_func}
 
  Heri
 
   -Original Message-
   From: GoodOne [mailto:[EMAIL PROTECTED]
   Sent: Wednesday, October 25, 2006 6:54 PM
   To: Log4J Users List
   Subject: [SPAM (Bayesain Analysis)] - Logging Cross Functional
   categories in log4j - Bayesian Filter detected spam
  
  
   Hello All,
This is my first posting so please bear with me.
  
   I am using log4j and I would like to log based on technical
   and functional
   partitions of the application so that I can filter logs later.
   So technical partition would include EJB, Persistence,
   Servlet, BusinessTier
   etc while functional partition could include
   Accounts,Servicing,Plan,Infrastructure etc.
  
   One idea is I could take a cartesian product as categories.
   Any other ideas are welcome.
  
   Thank you.
   The Good one.
  
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Cross Functional categories in log4j

2006-10-25 Thread James Stauffer

Do you only want to change the debug leve for functional partitions or
also technical partitions?

On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:

Thank you. But if I want to change the debug level in config file for all
EJBs across all functional partitions, would it be possible if i use MDC
values?



On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:

 One good option: use loggers based on the class name as normal and set
 MDC values for the technical and functional partitions.

 On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:
  Hello All,
   This is my first posting so please bear with me.
 
  I am using log4j and I would like to log based on technical and
 functional
  partitions of the application so that I can filter logs later.
  So technical partition would include EJB, Persistence, Servlet,
 BusinessTier
  etc while functional partition could include
  Accounts,Servicing,Plan,Infrastructure etc.
 
  One idea is I could take a cartesian product as categories.
  Any other ideas are welcome.
 
  Thank you.
  The Good one.
 
 


 --
 James Staufferhttp://www.geocities.com/stauffer_james/
 Are you good? Take the test at http://www.livingwaters.com/good/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]







--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Logging Cross Functional categories in log4j

2006-10-25 Thread GoodOne

The scenario is like this:
I have a massive clustered application. Uses SOA with services,
webcomponents, EJBs, software agents distributed all over. They all log with
their CellName, ClusterName, NodeName, AppName, ServiceName, OtherNames in
their local space. Lets say we have a mechanism to consolidate all the log
files in a central location.
Now I want to tweak the log generation based on WebComponents for Account
service independent of WebComponents for other services. Then I want to
change EJB Logging Level from Debug to Warn for all services across board.
Please dont ask me why I want to do that :-))) it is someone else's
requirements. We also want to have only 1 single log config file for all in
some network somewhere. Also I want to have UUID in the log for which I can
use MDC.
How would I do it?
Constraints: I want to avoid using 2 loggers in all the classes. I want to
tweak around the log generation.
We can change log level based on Node,Cluster level. But I dont know how to
provide for a mechanism to change both technical and functional partitions
independently.

On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:


Do you only want to change the debug leve for functional partitions or
also technical partitions?

On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:
 Thank you. But if I want to change the debug level in config file for
all
 EJBs across all functional partitions, would it be possible if i use MDC
 values?



 On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:
 
  One good option: use loggers based on the class name as normal and set
  MDC values for the technical and functional partitions.
 
  On 10/25/06, GoodOne [EMAIL PROTECTED] wrote:
   Hello All,
This is my first posting so please bear with me.
  
   I am using log4j and I would like to log based on technical and
  functional
   partitions of the application so that I can filter logs later.
   So technical partition would include EJB, Persistence, Servlet,
  BusinessTier
   etc while functional partition could include
   Accounts,Servicing,Plan,Infrastructure etc.
  
   One idea is I could take a cartesian product as categories.
   Any other ideas are welcome.
  
   Thank you.
   The Good one.
  
  
 
 
  --
  James Staufferhttp://www.geocities.com/stauffer_james/
  Are you good? Take the test at http://www.livingwaters.com/good/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread Jacob Kjome

Where do you put your config file?  And is the config file log4j.properties or
log4j.xml?  Do you use automatic configuration or manual configuration?

Jake

Quoting James Stauffer [EMAIL PROTECTED]:

 Can you turn on log4j debugging (set log4j.debug system property to
 true)?  That might help determine the cause.

 On 10/25/06, Adilson Dias da Silva [EMAIL PROTECTED] wrote:
  Hi,
  I and the fellows from the host admin are facing with a following
 situation:
  myApp doesn't create a log file whem running in the host's tomcat server
  (virtual host), but is OK whem running in a tomcat localhost.
  I have tested the same address used on log4j.xml, creating a file in the
  directory (/home/.../domains/myApp/logs/ ) and was created fine.
  I have migrate to tomcat from jboss by the same reason, and in the jboss  i
  have used the jboss soluction for RepositorySelector (
  http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector ) without
  success.
  I have the log4j-1.2.13.jar in the WEB-INF/lib directory of myApp and
  assumed that this approach in tomcat would provide a similar behavior to
  using Repository Selector.
  I have searched for threads in this mailing without success.
  I will appreciate any help.
  Thanks.
 
 
  Adilson Dias da Silva (BR)  * * *
  Sê plural como o universo.
  Pensamentos - Fernando Pessoa
  ***
 
 


 --
 James Staufferhttp://www.geocities.com/stauffer_james/
 Are you good? Take the test at http://www.livingwaters.com/good/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread Adilson Dias da Silva

Thanks,
James, debug=true, but i am not able do acces the host console.
Adilson


On 10/25/06, James Stauffer [EMAIL PROTECTED] wrote:


Can you turn on log4j debugging (set log4j.debug system property to
true)?  That might help determine the cause.

On 10/25/06, Adilson Dias da Silva [EMAIL PROTECTED] wrote:
 Hi,
 I and the fellows from the host admin are facing with a following
situation:
 myApp doesn't create a log file whem running in the host's tomcat server
 (virtual host), but is OK whem running in a tomcat localhost.
 I have tested the same address used on log4j.xml, creating a file in the
 directory (/home/.../domains/myApp/logs/ ) and was created fine.
 I have migrate to tomcat from jboss by the same reason, and in the
jboss  i
 have used the jboss soluction for RepositorySelector (
 http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector )
without
 success.
 I have the log4j-1.2.13.jar in the WEB-INF/lib directory of myApp and
 assumed that this approach in tomcat would provide a similar behavior to
 using Repository Selector.
 I have searched for threads in this mailing without success.
 I will appreciate any help.
 Thanks.


 Adilson Dias da Silva (BR)  * * *
 Sê plural como o universo.
 Pensamentos - Fernando Pessoa
 ***




--
James Staufferhttp://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Vote no monumento Cristo Redentor para que seja uma das 7 maravilhas do
mundo.
Gratuito, em www.new7wonders.com
 * * *
   Sê plural como o universo.
Pensamentos - Fernando Pessoa
***


Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread Adilson Dias da Silva

Hi, Jake,
Thanks,
It is a log4j.xml and it is in \WEB-INF and \classes also. it will be OK in
classes but, just in case.
automatic or manual? I d'not know what you are asking.
Adilson


On 10/25/06, Jacob Kjome [EMAIL PROTECTED] wrote:



Where do you put your config file?  And is the config file
log4j.properties or
log4j.xml?  Do you use automatic configuration or manual configuration?

Jake

Quoting James Stauffer [EMAIL PROTECTED]:

 Can you turn on log4j debugging (set log4j.debug system property to
 true)?  That might help determine the cause.

 On 10/25/06, Adilson Dias da Silva [EMAIL PROTECTED] wrote:
  Hi,
  I and the fellows from the host admin are facing with a following
 situation:
  myApp doesn't create a log file whem running in the host's tomcat
server
  (virtual host), but is OK whem running in a tomcat localhost.
  I have tested the same address used on log4j.xml, creating a file in
the
  directory (/home/.../domains/myApp/logs/ ) and was created fine.
  I have migrate to tomcat from jboss by the same reason, and in the
jboss  i
  have used the jboss soluction for RepositorySelector (
  http://wiki.jboss.org/wiki/Wiki.jsp?page=Log4jRepositorySelector )
without
  success.
  I have the log4j-1.2.13.jar in the WEB-INF/lib directory of myApp and
  assumed that this approach in tomcat would provide a similar behavior
to
  using Repository Selector.
  I have searched for threads in this mailing without success.
  I will appreciate any help.
  Thanks.
 
 
  Adilson Dias da Silva (BR)  * * *
  Sê plural como o universo.
  Pensamentos - Fernando Pessoa
  ***
 
 


 --
 James Staufferhttp://www.geocities.com/stauffer_james/
 Are you good? Take the test at http://www.livingwaters.com/good/

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Vote no monumento Cristo Redentor para que seja uma das 7 maravilhas do
mundo.
Gratuito, em www.new7wonders.com
 * * *
   Sê plural como o universo.
Pensamentos - Fernando Pessoa
***


Re: log4j doesn't log files when a app is running on tomcat host

2006-10-25 Thread Adilson Dias da Silva


 Hello All,
It is esquisite behavior because the source file to do a test writing a
file in the same address used on log4j.xml works OK.

So, log4j differs only in getting the address in a config xml file.


Sê plural como o universo.
Pensamentos - Fernando Pessoa
***





--
Vote no monumento Cristo Redentor para que seja uma das 7 maravilhas do
mundo.
Gratuito, em www.new7wonders.com
 * * *
   Sê plural como o universo.
Pensamentos - Fernando Pessoa
***