Question
RBS
IN
Last activity: 31 Jan 2018 3:43 EST
Including Cassandra Logs into prLogging
Hi,
We have a requirement to capture Cassandra logs. Can anybody help me how to implement the same and is there any possibilities to configure in prlogging.xml? If yes, please let me know the steps to do the same.
Thanks,
Henry.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi Henry,
If you are looking to enable the logging for slow queries then you can set the DEBUG mode to below class,
com.datastax.driver.core.QueryLogger.SLOW
If you want to get the log for normal queries i.e. queries that are completed successfully within a configurable threshold in milliseconds then you can use below class,
com.datastax.driver.core.QueryLogger.NORMAL
If you want to log unsuccessful queries i.e. queries that dint complete normally and threw an exception you can use the below class. Note this logger will also print the full stack trace of the reported exceptions.
com.datastax.driver.core.QueryLogger.ERROR
Hope this information might help you.
Regards
Mahesh
RBS
IN
Hi Mahesh,
Can you please clarify/provide the steps to enable this and also this configuration is for Cassandra logging if I am not wrong?
Thanks,
Henry
Pegasystems Inc.
US
To do so use Designer Studio menu (System > Operations > Logs), select Logging Level Settings and search for com.datastax.driver.core.QueryLogger.SLOW then set DEBUG.
Pegasystems Inc.
IN
Hi Henry ,
Whenever you will create (DDS)'Decision-Data-Store' [Designer-Studio>Decisioning>Infrastructure>Services>Decision Data Store| |Add node] your node will be added in the Cassandra cluster and there will be directory called Cassandra created in your application server root directory .
By default Cassandra logs placed inside PRPCTemp folder .
If you want to change the path of the Cassandra logs you can follow below steps
1)open the logback.xml file from F:\Application Servers\apache-tomcat-PRPC73\cassandra\conf directory .
2)Change the file name pattern to the desired path in below appender .
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${CASSANDRA_LOGDIR}/Cassandra-%d{yyyy-MMM-dd}.log.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>2MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
Hi Henry ,
Whenever you will create (DDS)'Decision-Data-Store' [Designer-Studio>Decisioning>Infrastructure>Services>Decision Data Store| |Add node] your node will be added in the Cassandra cluster and there will be directory called Cassandra created in your application server root directory .
By default Cassandra logs placed inside PRPCTemp folder .
If you want to change the path of the Cassandra logs you can follow below steps
1)open the logback.xml file from F:\Application Servers\apache-tomcat-PRPC73\cassandra\conf directory .
2)Change the file name pattern to the desired path in below appender .
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${CASSANDRA_LOGDIR}/Cassandra-%d{yyyy-MMM-dd}.log.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>2MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%-5level [%thread] %date{ISO8601} %F:%L - %msg%n</pattern>
<!-- old-style log format
<pattern>%5level [%thread] %date{ISO8601} %F (line %L) %msg%n</pattern>
-->
</encoder>
</appender>
you can check the Cassandra logs location always from (Designer Studio>System>Operations>Logs) .
Thanks,
Arun
RBS
IN
Hi Arun,
In case of Websphere where we can enable the settings for Cassandra??
Thanks,
Henry.
-
Grant Thompson