• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Slf4j - Log4j Not Work

 
Ranch Hand
Posts: 32
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MySQL Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just try another path without spaces in between (e.g.: D:\\temp\hibernate\hibernatefirst.log)
 
reply
    Bookmark Topic Watch Topic
  • New Topic