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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:44:44+00:00 2026-05-19T15:44:44+00:00

Possible Duplicates: Where/what level should logging code go? Debug Levels Is there a convention,

  • 0

Possible Duplicates:
Where/what level should logging code go?
Debug Levels

Is there a convention, a standard, or a widely used guide which will help with logging in Java? Specifically, what to include at each level (verbose, debug, … etc.) rather than the actual mechanism of logging.

There are many guides out there of what to include at each log level, but none of them are specific; they’re all vague, and this makes it hard to “follow orders”.

Any tips would be appreciated.

  • 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-19T15:44:45+00:00Added an answer on May 19, 2026 at 3:44 pm

    It’s subject to personal interpretation, but mine is (in order from finest to coursest):

    • Trace – The finest logging level. Can be used to log very specific information that is only relevant in a true debugging scenario, e.g., log every database access or every HTTP call etc.
    • Debug – Information to primary help you to debug your program. E.g., log every time a batching routine empties its batch or a new file is created on disk etc.
    • Info – General application flow, such as “Starting app”, “connecting to db”, “registering …”. In short, information which should help any observer understand what the application is doing in general.
    • Warn – Warns of errors that can be recovered. Such as failing to parse a date or using an unsafe routine. Note though that we should still try to obey the fail fast principle and not hide e.g., configuration errors using warning message, even though we a default value might be provided by the application.
    • Error – Denotes an often unrecoverable error. Such as failing to open a database connection.
    • Fatal/Critical Used to log an error the application cannot recover from, which might lead to an immediate program termination.

    In the end it’s up to you to define what suits you best. Personally, I run most production system with logging level of Info, where I’m mostly interested in following the applications main logic, and of course catch all warnings/errors.

    Except for code cluttering, there is no such thing as too much logging. All logging which helps you reproduce or understand problems better are good logging. On a performance note, most logging systems (e.g., log4j) allows configuring which level to actually append to the physical log which is a great thing.

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

Sidebar

Related Questions

Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's
Possible Duplicates: C++0X when? When will C++0x be finished? When will C++0x be released?
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the
Possible Duplicates: What is the best approach for a Java developer to learn C++
Possible Duplicates: How is heap and stack memories mananged, implemented, allocated? Stack,Static and Heap
Possible Duplicate: Case Statement Block Level Declaration Space in C# For example: string danger;
Possible Duplicate: How to prevent IFRAME from redirecting top-level window <iframe width=980px frameborder=0 marginheight=0
Possible Duplicates: [.NET] How do I disable a system device? Win32 API function to
Possible Duplicates: Why use ++i instead of i++ in cases where the value is

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.