You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by Armando Miraglia <a....@student.vu.nl> on 2013/06/15 19:08:50 UTC

Logging Giraph

Hi guys,

I would like to log debugging messages to trace the Algorithm on which I
am working. I have tried to add a log4j.properties file in the
configuration direcotry of hadoop with these options:

hadoop.root.logger=DEBUG,console
hadoop.metrics.log.level=DEBUG

but none of them helped me. Any ideas how I could use log.debug to
obtain messages from the algorithm I am writing?

Thanks a lot.
Armando

Re: Logging Giraph

Posted by Armando Miraglia <a....@student.vu.nl>.
Hi guys,

first of all, thanks a lot for your help!

After googling and testing I finally figured out that the appender is
wrongly configure. Adding an appender at runtime in the class works, so
I must have something wrong in the log4j.properties.

Can someone of you provide me a log4j.properties functioning
configuration? Anyway I will try to figure out what is wrong with my
configuration.

Thanks again!
Armando

Re: Logging Giraph

Posted by Armando Miraglia <a....@student.vu.nl>.
Hi Sebastian,

On Sat, Jun 15, 2013 at 07:34:44PM +0200, Sebastian Schelter wrote:
> which setup of Hadoop do you use? You should definitely have the
> userlogs directory.

Sorry, I meant that I don't have a log file for the job itself, but I do
have the userlogs directory. What I get are the stdout, stderr and stdin
files but no "log" file.

Re: Logging Giraph

Posted by Sebastian Schelter <ss...@apache.org>.
Armando,

which setup of Hadoop do you use? You should definitely have the
userlogs directory.

-sebastian

On 15.06.2013 19:31, Armando Miraglia wrote:
> On Sat, Jun 15, 2013 at 02:18:33PM -0300, Gustavo Enrique Salazar Torres wrote:
>> Hmm, did you check at log/userlogs/ ? There is directory for every job you
>> run and on every mapper Hadoop runs it creates a log file.
> 
> yes, but such a file is not created. At the moment I am cheating and I
> am using system.out.println disabling checkstyle at compilation time.
> Any suggestion what I could check for doing it the right way?
> 
> thanks && cheers,
> Armando
> 


Re: Logging Giraph

Posted by Armando Miraglia <a....@student.vu.nl>.
On Sat, Jun 15, 2013 at 02:18:33PM -0300, Gustavo Enrique Salazar Torres wrote:
> Hmm, did you check at log/userlogs/ ? There is directory for every job you
> run and on every mapper Hadoop runs it creates a log file.

yes, but such a file is not created. At the moment I am cheating and I
am using system.out.println disabling checkstyle at compilation time.
Any suggestion what I could check for doing it the right way?

thanks && cheers,
Armando

Re: Logging Giraph

Posted by Gustavo Enrique Salazar Torres <gs...@ime.usp.br>.
Armando:

If you are running on a single local node you can connect to the jobtracker
(http://localhost:50030 or the port you have configured) and see your job
running.
You can even browse into the job and see the actual mappers logging
activity.

Cheers
Gustavo


On Sat, Jun 15, 2013 at 2:46 PM, Armando Miraglia
<a....@student.vu.nl>wrote:

> Hi Avery,
>
> On Sat, Jun 15, 2013 at 10:22:51AM -0700, Avery Ching wrote:
> >   StrConfOption LOG_LEVEL = new StrConfOption("giraph.logLevel", "info");
>
> I actually tried this creating a giraph-conf.xml file in the
> configuration directory of hadoop and putting this:
>
> <configuration>
>   <property>
>     <name>giraph.logLevel</name>
>     <value>debug</value>
>   </property>
> </configuration>
>
> but no luck.
>
> Thanks to all!
> Armando
>

Re: Logging Giraph

Posted by Armando Miraglia <a....@student.vu.nl>.
Hi Avery,

On Sat, Jun 15, 2013 at 10:22:51AM -0700, Avery Ching wrote:
>   StrConfOption LOG_LEVEL = new StrConfOption("giraph.logLevel", "info");

I actually tried this creating a giraph-conf.xml file in the
configuration directory of hadoop and putting this:

<configuration>
  <property>
    <name>giraph.logLevel</name>
    <value>debug</value>
  </property>
</configuration>

but no luck.

Thanks to all!
Armando

Re: Logging Giraph

Posted by Avery Ching <ac...@apache.org>.
You can control the overall logging with

   StrConfOption LOG_LEVEL = new StrConfOption("giraph.logLevel", "info");

But if you turn it to debug, it's going to produce a lot of stuff =)

Avery

On 6/15/13 10:18 AM, Gustavo Enrique Salazar Torres wrote:
> Hmm, did you check at log/userlogs/ ? There is directory for every job you
> run and on every mapper Hadoop runs it creates a log file.
>
> Cheers
> Gustavo
>
>
> On Sat, Jun 15, 2013 at 2:08 PM, Armando Miraglia
> <a....@student.vu.nl>wrote:
>
>> Hi guys,
>>
>> I would like to log debugging messages to trace the Algorithm on which I
>> am working. I have tried to add a log4j.properties file in the
>> configuration direcotry of hadoop with these options:
>>
>> hadoop.root.logger=DEBUG,console
>> hadoop.metrics.log.level=DEBUG
>>
>> but none of them helped me. Any ideas how I could use log.debug to
>> obtain messages from the algorithm I am writing?
>>
>> Thanks a lot.
>> Armando
>>


Re: Logging Giraph

Posted by Gustavo Enrique Salazar Torres <gs...@ime.usp.br>.
Hmm, did you check at log/userlogs/ ? There is directory for every job you
run and on every mapper Hadoop runs it creates a log file.

Cheers
Gustavo


On Sat, Jun 15, 2013 at 2:08 PM, Armando Miraglia
<a....@student.vu.nl>wrote:

> Hi guys,
>
> I would like to log debugging messages to trace the Algorithm on which I
> am working. I have tried to add a log4j.properties file in the
> configuration direcotry of hadoop with these options:
>
> hadoop.root.logger=DEBUG,console
> hadoop.metrics.log.level=DEBUG
>
> but none of them helped me. Any ideas how I could use log.debug to
> obtain messages from the algorithm I am writing?
>
> Thanks a lot.
> Armando
>