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 8103213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:28:40+00:00 2026-06-05T23:28:40+00:00

Does logging decreases application performance? and how to restrict display-tags logs to be printed

  • 0

Does logging decreases application performance?
and how to restrict display-tags logs to be printed in log files?

eg. my log file has below logs

[2012-06-20 15:52:06,290] org.displaytag.tags.TableTag isFirstIteration 684 - [data] first iteration=true (row number=1)
[2012-06-20 15:52:06,290] org.displaytag.tags.TableTag isFirstIteration 684 - [data] first iteration=true (row number=1)
[2012-06-20 15:52:06,290] org.displaytag.tags.TableTag isFirstIteration 684 - [data] first iteration=true (row number=1)
[2012-06-20 15:52:06,290] org.displaytag.tags.TableTag isFirstIteration 684 - [data] first iteration=true (row number=1)

why the above is in log file?

log.properties file

# Log4j configuration file.
 log4j.rootCategory=DEBUG, A1
 # Available levels are DEBUG, INFO, WARN, ERROR, FATAL

 #
 # A1 is a ConsoleAppender 
 #

log4j.appender.A1 = org.apache.log4j.RollingFileAppender
log4j.appender.A1.File = C:/LogInfo/logfile.log
log4j.appender.A1.MaxFileSize = 100MB
log4j.appender.A1.MaxBackupIndex=50
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
log4j.appender.A1.append = true
log4j.appender.A1.layout.ConversionPattern = [%d] %C %M %L - %m%n
log4j.appender.A1.Threshold = DEBUG

how to stop (org.displaytag.tags.TableTag) these kind of logs to be printed in log files

  • 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-06-05T23:28:42+00:00Added an answer on June 5, 2026 at 11:28 pm

    Does logging decreases application performance?

    Yes. How much it does depends on a number of factors; see below.

    and how to restrict display-tags logs to be printed in log files?

    By changing the ConversionPattern in the logging properties

    why the above is in log file?

    Because:

    1. somewhere in the code is a call to a Logger method (probably debug(String)) with that message, and
    2. your logging properties set the logging Threshold to DEBUG for the appender.

    To improve performance:

    1. change the ConversionPattern to use less expensive date/time formatting, and (more importantly) avoid ‘C’, ‘F’, ‘L’ and ‘M’ because they are particularly expensive.
    2. change the logging Threshold to INFO or WARNING or ERROR to reduce the amount of logging,
    3. put the Logger.debug(...) call inside an if statement that checks that debug logging is enabled. This saves the cost of assembling the log message in cases where it won’t be needed; see In log4j, does checking isDebugEnabled before logging improve performance?.
    4. with log4j version 2 (log4j2), there are overloads that on the logging methods that take a format and parameters. These reduce the overhead when a logging at a level that is disabled.
    5. look also at logback and log4j 2.0.

    You can also throttle logging at the Logger level … as described in the log4j documentation. In fact, the documentation answers most of the questions that you asked, and has a lot of detail on the topics of logging performance and logging configuration.

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

Sidebar

Related Questions

Does any of these logging libraries support memory mapped files? If not, is there
I have an existing application which does all of its logging against log4j. We
I have a node.js script that does some logging to a file using WriteStream.
Does error_reporting(0); have any effect on error logging (to file), or does it just
Does the below snippet have potential to do error logging to a database or
Many logging systems allow you to filter the logs by 'log level', where the
Does NLog have any sort of functionality to consolidate repetitive log messages when logging
It seems logging.debug() doesn't appear in GAE logs, but logging.error() does. Does anyone have
Does PHP have built-in debugging logging like Ruby on Rails logger.info() to a development.log
The standard logging code does not seem to work instantiating a logger with the

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.