Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4126456
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:02:02+00:00 2026-05-21T00:02:02+00:00

My log4j messages are not including the class names: [INFO] 22:41 (?: decodeDirectory :?)

  • 0

My log4j messages are not including the class names:

[INFO] 22:41 (?: decodeDirectory :?)

Any idea why that would be so?

log4j.properties reads like so:

log4j.rootLogger=INFO, logfile, console

log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=ExifImageRA.log
log4j.appender.logfile.MaxFileSize=1MB
log4j.appender.logfile.MaxBackupIndex=1
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T00:02:03+00:00Added an answer on May 21, 2026 at 12:02 am

    It looks like what is actually missing from your log messages are the source file name (%F) and the line number (%L).

    • According to the javac Ant task: the debug attribute “[i]ndicates whether source should be compiled with debug information; defaults to off. If set to off, -g:none will be passed on the command line … “.

    • According to the javac manual, the source filename and line numbers are omitted from the .class file if you compile with javac -g:none.

    Hence, your log message lossage is a direct consequence of removing debug="true" from the javac task in your Ant build file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to configure my log4j logging to not log messages that are 1)
The log4j network adapter sends events as a serialised java object. I would like
In org.apache.log4j Class AsyncAppender public void setBufferSize(int size) Sets the number of messages allowed
I use log4j for logging. And I would like to modify methods: warn(..), error(..).
My log4j.properties file - log4j.rootLogger=INFO, stdout # =============== console output appender ===================== log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
I am creating a class with custom logging functionality, that internally uses Log4J .
in the system console I would like to log only messages from com.foo.* and
We use Log4j (and Commons Logging) to log our error messages. Now we want
In logging frameworks like log4j & log4net you have the ability to log various
I've got log4j configured on my Java project with the following log4j.properties: log4j.rootLogger=WARNING, X

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.