Logging
Logging is an essential part of any enterprise application. Through logging, we can trace or troubleshoot actual errors when the application is running. In any good product, we usually see that each error has an error code. Defining error codes and then using them while logging exceptions intuitively tells the developers or the support team to troubleshoot and reach the point where the actual error occurred and provide a solution. For all application-level errors, we can create a LoggingEvents class and specify the constant values that can be further used during development. Here is the LoggingEvents class that contains a few GET, CREATE, UPDATE, and other event codes. We can create this class under a Façade folder inside the Infrastructure ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access