• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

log4j:WARN No appenders could be found for logger (net.Encryption.Scrambler).

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I'm very new to java and spring and I'm currently trying to enhance a set of java code by using eclipse 3.1.1 and Springframework 3.0.5
however, i'm stuck at this error :

log4j:WARN No appenders could be found for logger (org.springframework.core.io.support.PathMatchingResourcePatternResolver).
log4j:WARN Please initialize the log4j system properly.


I've defined logger in all of my classes that involves with logger.debug for example , in my main class:

JobMgmt.java


DBHelper.java


JdbcDao.java



i don't really understand or knowing how to use logger as I did not write the previous code myself.
does the " static private log logger = " means that it careates classes when it run ?
I've installed log4j.jar and spring-core.jar but it doesn't help

anyone has any idea how to solve or what might caused the problem ?
any help would be much approciated.
Thank you
 
Marshal
Posts: 27531
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's all very well, but the log4j.properties file is where you declare your appenders, and you haven't shown us that.
 
sze sze chan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:That's all very well, but the log4j.properties file is where you declare your appenders, and you haven't shown us that.



thank you for your reply
hummm.... i don't have log4j.properties file inside my package....
should i just create one ? what should I put inside?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exactly. You get that warning whenever you are missing the log4j.properties configuration file. It should be in the root of your classpath. Regarding what goes in it, you should Google log4j.properties and you will find links to valid entries/tutorials and documentation to help you out.

Basically an appender is one that appends to something. For instance a txt file, or in a database, or in the console. So log message will appear where the appender tells it to put it.

There are categories, these are your packages that will be logged and at what logging level.

Also, this is a log4j question, not a Spring related question.

Good luck

Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic