aspose file tools*
The moose likes Other Open Source Projects and the fly likes Obtaining access to Logger using a different Mechanism Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Obtaining access to Logger using a different Mechanism " Watch "Obtaining access to Logger using a different Mechanism " New topic
Author

Obtaining access to Logger using a different Mechanism

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi, we are using a Log4j to implement Logging Mecanism in our Application .

we are not using

to obtain access to Log4j



Instead we used an SomeLogger class taht will return the instance of the Logger as shown below .



A code snippet of this SomeLogger is shown below :



What is the advantage we get if we use this way ??

Thanks in advance .


Save India From Corruption - Anna Hazare.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10288
    
168

I don't see a reason why that SomeLogger class is required. Does it have any javadoc or anything else which explains why it's there?

[My Blog] [JavaRanch Journal]
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks Jai for the response .

This might be useful to provide me a better response , this is the only code
// This code is getting the log4j.properties path



Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Isn't that class pointless? Why have you chosen to not use the out the box mechanisms for loading your log4j configuration?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yeah, unless there's other magic going on, or you really, really need to have your logging properties specified as a string constant, there are better, easier, more conventional ways of doing this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Obtaining access to Logger using a different Mechanism