Q:

Is it possible to create an error log in java that extends to all classes?

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.

A:

Take a look at the numerous Java logging frameworks available, in particular:

Log4j
slf4j

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.

