Reputation: 26
I am not able to understand that why do we use a library for logging files when we can simply write out the error or the exception by appending to a file.
Upvotes: 1
Views: 75
Reputation: 3467
Logging is a powerful aid for understanding and debugging program’s run-time behavior. Logs capture and persist the important data and make it available for analysis at any point in time.
Both using Logging framework(library) or simply write out log to a file do the minimum job of logging, but choosing one of them depends on size of your software.
For small size software which doesn't do any important/continuous task you don't need any logging framework. But for bigger one you need one of them without doubt. Some pros of Logging framework:
Upvotes: 1