Is it possible to create an error log in java that extends/works to all classes in a package?
So when I handle exceptions in various classes, I can simply log that error into one single file.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at the numerous Java logging frameworks available, in particular:
Both of these allow you to customize (at config time and runtime) which statements to log, where to log them (the console, a single file, many files, files per error level) and how to format them.