Does the below snippet have potential to do error logging to a database or text file? I know it can write to the Eclipse console. I’m a .NET developer so I’m not totally sure.
private final static Log log = LogFactory.getLog(ActivityServiceImpl.class);
I’m not sure exactly what you are trying to do here. If you just want to log to console, you can of course use System.out.println(…). This is easy, but obviously won’t add file and line, timestamps, and allow you to control log levels, etc.
If you are starting something more than a toy project, you’ll probably be best off with log4j (as was mentioned in your first comment above).
Configuring it to output to a file and/or a console is trivial and there are a number of connectors that will output to a database as well, if that is what you want. Here is one:
http://www.tutorialspoint.com/log4j/log4j_logging_database.htm
If you are using maven, I’m happy to point you to the relevant poms. If not, downloading the jars shouldn’t be very hard either. (See your first comment for the site from which to fetch them).