A developer is automating a production level process in the Robotic Enterprise (RE) Framework. Based on best practices, when should the developer log a meaningful message with the Logging Level as "Information"?
A.
Each time an exception is caught in a Catch block
B.
Every time the robot encounters an error on a Queue Item
C.
Every time a variable or argument value is used
Why Not the Other Options?
A. Each time an exception is caught in a Catch block:
Logging exceptions should be done with a "Warning" or "Error" level, depending on the severity. Logging them at the "Information" level is not best practice, as exceptions indicate abnormal behavior.
B. Every time the robot encounters an error on a Queue Item:
Errors related to Queue Items should also be logged with a "Warning" or "Error" level, not "Information", because they represent failures that require attention.
C. Every time a variable or argument value is used:
Logging every variable or argument value would lead to excessive logs, reducing readability and making it harder to identify meaningful information. Logging at this level is unnecessary unless debugging is specifically required.
Conclusion:
The "Information" logging level is best used for significant, non-error-related events in the process, such as reading data from external sources. This makes D the correct answer.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Biero
3 weeks, 6 days agoschnakicool
4 months ago