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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:59:41+00:00 2026-06-14T19:59:41+00:00

Well…I do know it’s good to log errors when the website is in production

  • 0

Well…I do know it’s good to log errors when the website is in production and error reporting is off. But what should I actually log? I can’t log all errors, so I should to choose some most errors-probable places in the code and call the function with some message to log this. Should I use try-catch to do this? And is it actually the best way to do this?

  • 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-14T19:59:42+00:00Added an answer on June 14, 2026 at 7:59 pm

    You should have several levels of error severity, all of which are handled differently:

    • debug level messages are just for debugging, e.g. very verbosely outputting information about everything that’s happening
    • info level messages inform about important events, like “trying to contact web service”
    • notices are not unusual, but noteworthy events
    • warnings are problems which need to be corrected, but do not cause immediate problems
    • errors should be logged in detail and monitored
    • critical errors are unexpected emergencies and should be logged in detail and possibly emailed automatically
    • alerts require immediate attention and should trigger automated SMS notifications
    • emergencies should automatically have the national guard deploy

    You intersperse your app with all these different types of errors/events. Notices and up should be logged, errors and up should be logged in detail (dump the system status into a separate file) and for critical errors and up somebody should be automatically notified.

    See https://github.com/Seldaek/monolog for a good component which can help you do this.

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

Sidebar

Related Questions

Well, I know there is a lots of posts about it, but I have
Well it should work in IE, I know IE doesnt support content property anything
Well, first I know that this question was already asked several times. But I
Well, it may actually be a simple case but I'm having a tough time
well I know it's easier on html5, but I have to use html4 or
Well, my website can not redirect to https://www.facebook.com/QuaFootSpa from http://quafootspa.com/ I have tried redirection
Well, I have a application which somehow requires some system resources, but how do
Well, I was trying to fix this program, and I keep getting the errors
Well I created a jquery mobile form but the every element is in a
Well..I am learning java now and I am curious to know will this yield

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.