java - log4j:WARN No appenders could be found for logger. Log4j 1.2.17 jar -


i

is getting this error
  log4j: warning not found appenders to be found for logger (Com.company.Main). Log4j: Start the Warning Log4j system properly. Log4j: See Warning http://logging.apache.org/log4j/1.2/faq.html#noconfig For more information  

This is my main

 < Code> package com.company; Import org.apache.log4j.Logger; Public Class Main {Last Stable Logger Logger = Logger Tag (main square); Public static zero main (string [] args) {If logger error is enabled () (logger. Debug ("this is debug"); // logs an error message with parameter logger. Although this is my log.properties file  
  # root logger option log4j.rootLogger = debug, stdout, file # Redirection log messages log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target = System.out log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.stdout Layout.ConversionPat Tern =% D {yyyy-MM-dd HH: mm: ss}% -5p% c {1}:% L -% m% n # Redirect log messages to log file, support rolling file. Log4j.appender .file = org.apache.log4j.RollingFileAppender log4j.appender.file.File = C: \\ log4j-application.log log4j.appender.file.MaxFileSize = 5MBlog4j.appender.file.MaxBackupIndex = 10log4j.appender.file .layout = org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern =% d {yyyy-mM-yyyy HH: mm: ss}% -5p% c {1}:% L -% M% n  

And this is my file structure.

I am learning Log4J level and try I am doing a dummy project to understand it in depth.

to your classpath To add your ressources directory. After that it should work.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - @PluginTarget(Node.class) not registering as neo4j plugin -

python - Calculate STD manually using Groupby Pandas DataFrame -