You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by ruslan usifov <ru...@gmail.com> on 2012/01/24 22:50:30 UTC

Enable thrift logging

Hello

I try to log thrift log message (this need to us for solve communicate
problem between Cassandra daemon and php client ), so in
log4j-server.properties i write follow lines:

log4j.logger.org.apache.thrift.transport=DEBUG,THRIFT

log4j.appender.THRIFT=org.apache.log4j.RollingFileAppender
log4j.appender.THRIFT.maxFileSize=20MB
log4j.appender.THRIFT.maxBackupIndex=50
log4j.appender.THRIFT.layout=org.apache.log4j.PatternLayout
log4j.appender.THRIFT.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F
(line %L) %m%n
log4j.appender.THRIFT.File=/var/log/cassandra/8.0/thrift.log


But no any messages in log in this case(but thay must be, i.e. Exception
trace), if we enable DEBUG in rootLogger ie:

log4j.rootLogger=DEBUG,stdout,R

Thrift log messages appear in sytem.log as expected, but how can we
separate them to separate log?

PS: cassandra 0.8.9

Re: Enable thrift logging

Posted by ruslan usifov <ru...@gmail.com>.
2012/1/25 aaron morton <aa...@thelastpickle.com>

> Do you want to log from inside the thrift code or from the cassandra
> thrift classes ?
>
>
Exceptions happens inside thrift, so inside thrift:-)))


> if it's the later try
>
> log4j.logger.org.apache.thrift=DEBUG,THRIFT
>>
>
> org.apache.thrift.transport is part of thrift proper.
>

I try this but without any result



>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 25/01/2012, at 11:36 AM, R. Verlangen wrote:
>
> Pick a "custom" loglevel and redirect them with the /etc/syslog.conf ?
>
> 2012/1/24 ruslan usifov <ru...@gmail.com>
>
>> Hello
>>
>> I try to log thrift log message (this need to us for solve communicate
>> problem between Cassandra daemon and php client ), so in
>> log4j-server.properties i write follow lines:
>>
>> log4j.logger.org.apache.thrift.transport=DEBUG,THRIFT
>>
>> log4j.appender.THRIFT=org.apache.log4j.RollingFileAppender
>> log4j.appender.THRIFT.maxFileSize=20MB
>> log4j.appender.THRIFT.maxBackupIndex=50
>> log4j.appender.THRIFT.layout=org.apache.log4j.PatternLayout
>> log4j.appender.THRIFT.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F
>> (line %L) %m%n
>> log4j.appender.THRIFT.File=/var/log/cassandra/8.0/thrift.log
>>
>>
>> But no any messages in log in this case(but thay must be, i.e. Exception
>> trace), if we enable DEBUG in rootLogger ie:
>>
>> log4j.rootLogger=DEBUG,stdout,R
>>
>> Thrift log messages appear in sytem.log as expected, but how can we
>> separate them to separate log?
>>
>> PS: cassandra 0.8.9
>>
>
>
>

Re: Enable thrift logging

Posted by aaron morton <aa...@thelastpickle.com>.
Do you want to log from inside the thrift code or from the cassandra thrift classes ? 

if it's the later try

> log4j.logger.org.apache.thrift=DEBUG,THRIFT

org.apache.thrift.transport is part of thrift proper. 

Cheers

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 25/01/2012, at 11:36 AM, R. Verlangen wrote:

> Pick a "custom" loglevel and redirect them with the /etc/syslog.conf ?
> 
> 2012/1/24 ruslan usifov <ru...@gmail.com>
> Hello
> 
> I try to log thrift log message (this need to us for solve communicate problem between Cassandra daemon and php client ), so in log4j-server.properties i write follow lines:
> 
> log4j.logger.org.apache.thrift.transport=DEBUG,THRIFT
> 
> log4j.appender.THRIFT=org.apache.log4j.RollingFileAppender
> log4j.appender.THRIFT.maxFileSize=20MB
> log4j.appender.THRIFT.maxBackupIndex=50
> log4j.appender.THRIFT.layout=org.apache.log4j.PatternLayout
> log4j.appender.THRIFT.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
> log4j.appender.THRIFT.File=/var/log/cassandra/8.0/thrift.log 
> 
> 
> But no any messages in log in this case(but thay must be, i.e. Exception trace), if we enable DEBUG in rootLogger ie:
> 
> log4j.rootLogger=DEBUG,stdout,R
> 
> Thrift log messages appear in sytem.log as expected, but how can we separate them to separate log?
> 
> PS: cassandra 0.8.9
> 


Re: unsubscribe

Posted by aaron morton <aa...@thelastpickle.com>.
http://wiki.apache.org/cassandra/FAQ#unsubscribe
-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 25/01/2012, at 11:49 AM, mike.li@thomsonreuters.com wrote:

>  
> 
> This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.


unsubscribe

Posted by mi...@thomsonreuters.com.

This email was sent to you by Thomson Reuters, the global news and information company. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.

Re: Enable thrift logging

Posted by "R. Verlangen" <ro...@us2.nl>.
Pick a "custom" loglevel and redirect them with the /etc/syslog.conf ?

2012/1/24 ruslan usifov <ru...@gmail.com>

> Hello
>
> I try to log thrift log message (this need to us for solve communicate
> problem between Cassandra daemon and php client ), so in
> log4j-server.properties i write follow lines:
>
> log4j.logger.org.apache.thrift.transport=DEBUG,THRIFT
>
> log4j.appender.THRIFT=org.apache.log4j.RollingFileAppender
> log4j.appender.THRIFT.maxFileSize=20MB
> log4j.appender.THRIFT.maxBackupIndex=50
> log4j.appender.THRIFT.layout=org.apache.log4j.PatternLayout
> log4j.appender.THRIFT.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F
> (line %L) %m%n
> log4j.appender.THRIFT.File=/var/log/cassandra/8.0/thrift.log
>
>
> But no any messages in log in this case(but thay must be, i.e. Exception
> trace), if we enable DEBUG in rootLogger ie:
>
> log4j.rootLogger=DEBUG,stdout,R
>
> Thrift log messages appear in sytem.log as expected, but how can we
> separate them to separate log?
>
> PS: cassandra 0.8.9
>