Logger entries are not displaying

I have set up my logger per the instructions found here. However, none of my log entries (info, warn, debug) will show in the log. I also get a message in the log as follows:

log4j:WARN No appenders could be found for logger (org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

If I use System.out.println in my binding code, I see the message in the log, but not if I use logger.debug(“Some text here”);

What could be the problem?

Can you show a little bit more of your code?

Thanks for your reply. My code is the same as shown in the link.

private Logger logger = LoggerFactory.getLogger(MyBindingClass.class);
logger.debug("Initializing thing: {}", thingName);

However, I have solved my problem. For others who may have this problem in the future: I modified the file openhab-demo/app/runtime/logback.xml to activate logging for my package. Actually, I just activated it for all bindings by adding the following line:

<logger name="org.openhab.binding" level="DEBUG"/>

The file is pretty well documented if you need to modify the logging parameters.

1 Like