You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@htrace.apache.org by Lewis John Mcgibbney <le...@gmail.com> on 2016/05/17 04:02:49 UTC

Obtaining HTrace Logging in Client Applications

Hi Folks,
So I consume htrace-core4 in the Nuch Java application. I am however not
able to see the HTrace DEBUG log statements.
I am aware that HTrace uses commons-logging and I have tried adding
commons-logging.properties on my classpath with the following contents

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
log4j.configuration=log4j.properties
LocalFileSpanReceiver.level=DEBUG

The log4j.properties file is in the same directory.
I am unable to see any log statements from HTrace...
Has anyone else had any luck?
Thanks
Lewis

-- 
*Lewis*

Re: Obtaining HTrace Logging in Client Applications

Posted by Stack <st...@duboce.net>.
Is log4j.properties dir in the CLASSPATH? What is in it?
St.Ack

On Mon, May 16, 2016 at 9:02 PM, Lewis John Mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Hi Folks,
> So I consume htrace-core4 in the Nuch Java application. I am however not
> able to see the HTrace DEBUG log statements.
> I am aware that HTrace uses commons-logging and I have tried adding
> commons-logging.properties on my classpath with the following contents
>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> log4j.configuration=log4j.properties
> LocalFileSpanReceiver.level=DEBUG
>
> The log4j.properties file is in the same directory.
> I am unable to see any log statements from HTrace...
> Has anyone else had any luck?
> Thanks
> Lewis
>
> --
> *Lewis*
>

Re: Obtaining HTrace Logging in Client Applications

Posted by Colin McCabe <cm...@apache.org>.
I have gotten log output out of htrace4-core in Hadoop.

I used the line:
> log4j.rootLogger=TRACE,file,console

commons-logging is a kind of shim which is (usually but not always) on
top of log4j.

Perhaps try modifying your log4j settings?  Unfortunately it's hard to
give good advice about log4j since there are so many configurations. 
One thing that helps sometimes is using strace to find out which
log4j.properties file it's really opening.

best,
Colin


On Mon, May 16, 2016, at 21:02, Lewis John Mcgibbney wrote:
> Hi Folks,
> So I consume htrace-core4 in the Nuch Java application. I am however not
> able to see the HTrace DEBUG log statements.
> I am aware that HTrace uses commons-logging and I have tried adding
> commons-logging.properties on my classpath with the following contents
> 
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> log4j.configuration=log4j.properties
> LocalFileSpanReceiver.level=DEBUG
> 
> The log4j.properties file is in the same directory.
> I am unable to see any log statements from HTrace...
> Has anyone else had any luck?
> Thanks
> Lewis
> 
> -- 
> *Lewis*