Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Slf4j - Log4j Not Work

 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all masters

I get problem create a log in hibernate, i have not see my log.
This my step :
1. In my library i have slf4j-api-1.6.4.jar , slf4j-simple-1.6.4.jar , slf4j-log4j12-1.6.4.jar
2. I create pom.xml file in src/
3. I set pom.xml according to my version of Hibernate and slf4j. I use Hibernate 3.3.0GA
4. I create log4j.properties in src/ and in the log4j i set directory for my log :
D:\\Goes to Campus\Belajar\Hibernate\hibernatefirst.log

But i try to save hibernatefirst.log in D:\\ it works.
What's wrong?

I run my Hibernate Application and it not shown in hibernatefirst.log file.

Please help me..

Thank you..
 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i try to save hibernatefirst.log in D:\\ it works.
What's wrong?

Have you tried a path without spaces in it (like "D:\\Goes to Campus\..."). Do you get any exceptions?

Can you show your pom.xml? What kind of application is this (standalone, web etc...) and how you run it?
 
Fandy Akhmad
Ranch Hand
Posts: 32
Java Linux MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your responds..
This is standalone application.

Ya, i try to create 'hibernatefirst.log' file in :
D:\Goes to Campus\Belajar\Hibernate\
I write the path in log.properties like this :

but the log information not save in 'hibernatefirst.log' on the path above.

And i try create in :
D:\
log information can save in 'hibernatefirst.log' file.

How i resolve that path? May be any rules to write a path file in Log4j.


This my pom.xml

 
Vijitha Kumara
Bartender
Pie
Posts: 3930
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just try another path without spaces in between (e.g.: D:\\temp\hibernate\hibernatefirst.log)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic