Kevin A. Burton | 3 Jan 08:25 2005

Re: stacktrace information logger patch...

Ceki Gülcü wrote:

>
> Hi Kevin,
>
> My comments below are entirely based  on the use case where you have a
> log statement indicating some method,  say X, was called. However, you
> do not know  how, why or who called X. That  is where your %stacktrace
> word comes into play.
>
> Your  current contribution  is a  good step  forward but  not entirely
> sufficient to  address the above use  case. If you use  the long form,
> since all  logging output will  contain a stacktrace, your  log output
> will be long and verbose making it hard to  decipher. If you use
> the short  form, the log  output will be  easier to read. However, a 
> single
> line of stack trace may not  be enough to clearly understand the chain
> of events  resulting in the invocation  of X. You need  more slack with
> more lines of stack.

Well I agree.. I think I even noted this in the source if you read all 
the comments ;)

Here's what I said inline:

>         //NOTE: when option is an integer here we could just return 
> this many
>         //lines.  As an example you could have %stacktrace{5} and only 
> return 5
>         //lines of the stack.
(Continue reading)

Johnny Gonzalez | 3 Jan 19:46 2005
Picon
Picon

RE: Loading configuration file

Hello,

I still have no success with log4j. I downloaded
1.2.9, and renamed my configuration file to
log4j.properties but it's not creating any log in the
log files. What can be wrong?

- I'm using eclipse 3.0.
- I tryed with the log files in the same directory of
my configuration file but doesn't work.
- my log4j.properties is into the root of the project
- my log4j configuration file looks like this:

#coloca los niveles de los loggers en debug y error, 
y adiciona appenders
log4j.logger.co.com=ERROR,ap1,ap2
log4j.logger.erroresStack=ERROR,ap3

#configuracion del appender 1
log4j.appender.ap1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ap1.DatePattern='.'yyyy-MM-dd
log4j.appender.ap1.File=logSEMC.txt
log4j.appender.ap1.threshold=DEBUG

#configuracion del appender 3
log4j.appender.ap3=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ap3.DatePattern='.'yyyy-MM-dd
log4j.appender.ap3.File=logSEMCErrores.txt
log4j.appender.ap3.threshold=ERROR

(Continue reading)

Curt Arnold | 3 Jan 21:02 2005
Picon

Re: Loading configuration file


On Jan 3, 2005, at 12:46 PM, Johnny Gonzalez wrote:

> Hello,
>
> I still have no success with log4j. I downloaded
> 1.2.9, and renamed my configuration file to
> log4j.properties but it's not creating any log in the
> log files. What can be wrong?
>
> - I'm using eclipse 3.0.
> - I tryed with the log files in the same directory of
> my configuration file but doesn't work.
> - my log4j.properties is into the root of the project
> - my log4j configuration file looks like this:
>

You might check the working directory for your Debug or Run 
configuration to see if it is set to the location of your 
log4j.properties file.  Select Run/Run... or Run/Debug... from the 
Eclipse menu and then select the "Arguments" pane.  If that looks okay, 
you could try explicitly stating the location of the configuration file 
by adding -Dlog4j.configuration=FILENAME to the VM arguments.
Johnny Gonzalez | 3 Jan 22:47 2005
Picon
Picon

Re: Loading configuration file


Hello Arnold,

I Followed your recommendations, but it still doesn't
work. But for example when I make a:

log.error("Variables");

I'm receiving messages in the console like this:

ERROR [main] (SemcControlador.java:280) - Variables:

but There's no output to the files :-(

When I open the Arguments pane, as you told me to do,
appears selected an option that says:

Use default working directory

If I deselect that checkbox, appears this:

${workspace_loc:AplicacionSEMC}

Is this OK? I tryed both options but none worked. What
could you recommend me?

Thanks a lot,
Johnny

 --- Curt Arnold <carnold <at> apache.org> escribió: 
(Continue reading)

Curt Arnold | 3 Jan 23:57 2005
Picon

Re: Loading configuration file


On Jan 3, 2005, at 3:47 PM, Johnny Gonzalez wrote:

>
> Hello Arnold,
>
> I Followed your recommendations, but it still doesn't
> work. But for example when I make a:
>
> log.error("Variables");
>
> I'm receiving messages in the console like this:
>
> ERROR [main] (SemcControlador.java:280) - Variables:
>
> but There's no output to the files :-(
>
> When I open the Arguments pane, as you told me to do,
> appears selected an option that says:
>

My guess was that locating log4j.properties was the problem.  However, 
if you are getting logging messages to the console then something is 
configuring log4j, so either log4j.properties is being found or 
something else is configuring log4j.

I would suggest  modifying your log4j.properties file to see if it is 
responsible for your configuration.  If you make the following change:

-log4j.logger.co.com=ERROR,ap1,ap2
(Continue reading)

Jacob Kjome | 4 Jan 06:28 2005

Re: Loading configuration file


And don't forget that if log4j.xml is in some directory on the classpath as 
well, it will get used in preference to log4j.properties.  I suggest moving 
to log4j.xml if at all possible.

Jake

At 04:57 PM 1/3/2005 -0600, you wrote:
 >
 >On Jan 3, 2005, at 3:47 PM, Johnny Gonzalez wrote:
 >
 >>
 >> Hello Arnold,
 >>
 >> I Followed your recommendations, but it still doesn't
 >> work. But for example when I make a:
 >>
 >> log.error("Variables");
 >>
 >> I'm receiving messages in the console like this:
 >>
 >> ERROR [main] (SemcControlador.java:280) - Variables:
 >>
 >> but There's no output to the files :-(
 >>
 >> When I open the Arguments pane, as you told me to do,
 >> appears selected an option that says:
 >>
 >
 >My guess was that locating log4j.properties was the problem.  However,
(Continue reading)

Dino Di Cola | 4 Jan 11:03 2005
Picon

Chainsaw v2 Plugin for Eclipse

Hi all.
I would like to know if is it planned to deliver
Chainsaw v2 as plugin for Eclipse. 

Many thanks in advance!

Regards,

Dino.
--

		
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica…
Scaricalo ora! 
http://it.messenger.yahoo.it
Johnny Gonzalez | 4 Jan 15:15 2005
Picon
Picon

Re: Loading configuration file

Hello Arnold,

Thanks a lot for your help it was very useful. I have
several jar files that I need to invoke some services
from my server (jboss), and I note that one of those
jar files has a configuration file for log4j in the
server, so when I tryed to lot messages in my
application it was using the configuration file in the
server.

Now I'm using this technique:

PropertyConfigurator logProperties = new
PropertyConfigurator();
		  logProperties.configure("conf/log4j.properties");

And now I am completely sure log4j is using this
configuration file.

Thanks a lot again,
Johnny

 --- Curt Arnold <carnold <at> apache.org> escribió: 
> 
> On Jan 3, 2005, at 3:47 PM, Johnny Gonzalez wrote:
> 
> >
> > Hello Arnold,
> >
> > I Followed your recommendations, but it still
(Continue reading)

Johnny Gonzalez | 4 Jan 15:17 2005
Picon
Picon

Re: Loading configuration file

Hello Jacob,

Thanks a lot for your help it was very useful. I have
several jar files that I need to invoke some services
from my server (jboss), and I note that one of those
jar files has a configuration file for log4j in the
server and as you said the file is log4j.xml, so when
I tryed to lot messages in my application it was using
the configuration file in the server.

Now I'm using this technique:

PropertyConfigurator logProperties = new
PropertyConfigurator();
		  logProperties.configure("conf/log4j.properties");

And now I am completely sure log4j is using this
configuration file.

Thanks a lot again,
Johnny

PS: I will follow your recommendation using the file
log4j.xml.

 --- Jacob Kjome <hoju <at> visi.com> escribió: 
> 
> And don't forget that if log4j.xml is in some
> directory on the classpath as 
> well, it will get used in preference to
(Continue reading)

Scott Deboy | 4 Jan 16:31 2005

RE: Chainsaw v2 Plugin for Eclipse

Hi Dino,

Not currently.

Scott

-----Original Message-----
From:	Dino Di Cola [mailto:dinodicola <at> yahoo.it]
Sent:	Tue 1/4/2005 2:03 AM
To:	log4j-user <at> logging.apache.org
Cc:	
Subject:	Chainsaw v2 Plugin for Eclipse
Hi all.
I would like to know if is it planned to deliver
Chainsaw v2 as plugin for Eclipse. 

Many thanks in advance!

Regards,

Dino.
--

		
___________________________________ 
Nuovo Yahoo! Messenger: E' molto più divertente: Audibles, Avatar, Webcam, Giochi, Rubrica…
Scaricalo ora! 
http://it.messenger.yahoo.it

---------------------------------------------------------------------
(Continue reading)


Gmane