Skip to main content
added 216 characters in body
Source Link
Mark Davidson
  • 9.5k
  • 6
  • 48
  • 62

Usually the amount you log depends on the kind of error. The more critical the more you log.

In regards to other stuff you would want to log

  • Filename for the file that caused the error would be high up the list, with line number.
  • Stack trace information if the error was a result of an exception being thrown.

I don't think you can overkill the amount you log when an error occurs as long as its useful. The only time I have seen logs become really bad is when massive logs are being taken even when an error does not occur.

Some more information can be found on the OWASP website - Error Handling and Logging.

Usually the amount you log depends on the kind of error. The more critical the more you log.

In regards to other stuff you would want to log

  • Filename for the file that caused the error would be high up the list, with line number.
  • Stack trace information if the error was a result of an exception being thrown.

Some more information can be found on the OWASP website - Error Handling and Logging.

Usually the amount you log depends on the kind of error. The more critical the more you log.

In regards to other stuff you would want to log

  • Filename for the file that caused the error would be high up the list, with line number.
  • Stack trace information if the error was a result of an exception being thrown.

I don't think you can overkill the amount you log when an error occurs as long as its useful. The only time I have seen logs become really bad is when massive logs are being taken even when an error does not occur.

Some more information can be found on the OWASP website - Error Handling and Logging.

Source Link
Mark Davidson
  • 9.5k
  • 6
  • 48
  • 62

Usually the amount you log depends on the kind of error. The more critical the more you log.

In regards to other stuff you would want to log

  • Filename for the file that caused the error would be high up the list, with line number.
  • Stack trace information if the error was a result of an exception being thrown.

Some more information can be found on the OWASP website - Error Handling and Logging.