What are example of information that should be logged with TRACE and not with DEBUG?
If I have an algorithm that goes through a bunch of steps, trace level will print info about each of those steps at the finest level. Things like the literal inputs and outputs of every step.
In general, trace will include all debug (just like debug includes all warnings and errors).
What specific problem do I solve by logging that information?
You need to debug something that outputs way too much data to log outside of a specific build when you're targeting that particular thing and do not care about errors or other logging info (since the volume of trace info will obscure them). In some loggers, you will turn a certain module up to trace level only.
In those examples, what are the properties of the logged information that clearly discriminate between logging at the TRACE level rather than the DEBUG level?
In general, trace level logging cannot be on for sustained periods because it degrades the performance of the application greatly, and/or creates an abundance of log data that is unsustainable due to disk/bandwidth constraints.
Debug level logging can usually be on for a longer period without making the app unusable.
Read full article from java - Why does the TRACE level exist, and when should I use it rather than DEBUG? - Software Engineering Stack Exchange
No comments:
Post a Comment