Thanks Ashish :)

I took a look in the directory HADOOP_BASE_PATH/logs/userlogs/job_number , but 
in the syslog there are no indications about the these logs. Right now I am 
running Giraph in a pseudo-distributed mode, so it should be in this machine.

I even tried to change from LOG.debug("") to LOG.info("") to see if it appears 
in the logs and it still didn't work. Am I missing something? Should I somehow 
initialize the LOG by a different method than just declaring it with

"private static final Logger LOG =
      Logger.getLogger(SimpleBFSComputation.class);"?

I am trying to log right now with:

"LOG.info("testinglog");"

Best Regards,
Marco Lotz
________________________________
From: Ashish Jain <ashish....@gmail.com>
Sent: 09 August 2013 18:48
To: user@giraph.apache.org
Subject: Re: Logger output

Hello Marco,

In my experiments, I have found the log output to be in the hadoop log file of 
the application. When you run your application, note down the job number. The 
hadoop log file is usually in HADOOP_BASE_PATH/logs/userlogs/job_number. In it 
you need to look at syslog, among the various lines interleaved will be the 
output of Log.

If you run your program on a cluster, you might have to find out on which node 
was the program run. One way is, if you use -op in your application, look at 
the log to see the cluster node name. Other way is to just check the 
HADOOP_BASE_PATH/logs/userlogs/job_number on all the nodes of your cluster. You 
will find output from the MasterThread and from one/more worker threads.

This is the approach I have used, there might be a better way to do this. Hope 
this helps.

Ashish


On Fri, Aug 9, 2013 at 4:43 AM, Marco Aurelio Barbosa Fagnani Lotz 
<m.a.b.l...@stu12.qmul.ac.uk<mailto:m.a.b.l...@stu12.qmul.ac.uk>> wrote:
Hello there! :)

I am writing a Giraph application but I could not find the output place for the 
logs.
Where is the default output path to see the logged info?

By log I mean the log that is inside a class that one creates:

private static final Logger LOG =
      Logger.getLogger(SimpleBFSComputation.class);

I call the following method to enable that log to debug:
Log.setLevel(Level.DEBUG);

And then write some random content in it:
if (LOG.isDebugEnabled){
    LOG.debug("This is a logged line");}


Just to clarify, if I called the "Log.setLevel(Level.DEBUG);" I am enabling the 
log for debug, and then the method isDebugEnabled will return true, correct?

Best Regards,
Marco Lotz

Reply via email to