Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

using log4j for logging

$
0
0

Hello,

 

I want to use log4j for logging in my java application on cloud platform(i am using neo.ondemand.com). I have followed the steps in Log4j Bridge and included log4j-over-slf4j.jar in my class path using


<dependency>

  <groupId>org.slf4j</groupId>

  <artifactId>log4j-over-slf4j</artifactId>

  <version>1.7.7</version>

</dependency>

 

So I assume, all the logging calls are delegated to log4j. However, i get an error when i try to use few methods that are available in log4j. for instance

Logger.getRootLogger ().setLevel (Level.OFF);

 

My java application was developed with log4j1.2 version. And there are lot of instances like setLevel.

 

I tried to log the path of the class using Logger.class.getClassLoader().getResource() and i see the Logger is loaded from /usr/sap/ljs/plugins/org.slf4j.log4j_1.7.2.v20130115-1340.jar!/org/apache/log4j/Logger

 

I was assuming i should be loaded from log4j-over-slf4j.jar

 

Is there any thing else i need to configure.

 

Any help is greatly appreciated.

 

Thanks in Advance

Vijay R.


Viewing all articles
Browse latest Browse all 3131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>