Updating a log java

When some important action occurred in my Java server, I would print a line of text out to the console.call, it was extremely easy to add and remove them for debugging (an example of “printf debugging”).Does that mean my code would become a repetitive mess?Logger logger = new Logger(); server.execute Some Important Action(); logger.print Specific Action To Location A() logger.print Specific Action To Location B() logger.print Specific Action To Location C() logger.print Specific Action To Location D(); // continue with the program...However, since I had implemented the Observer Pattern earlier in the project, I merely had to change my Writer to a Buffered Writer in one location. I would like to update my java version (UPDATE, not install) on my ubuntu 12.04 computer.Not only would logging provide useful information about the status of requests, but it would also highlight potential bugs that might pop up during its normal use.We dedicated a story to the development of a robust logging system, and I have used the logs extensively throughout the development process.

Each of my log statements had to be rewritten as a Buffered Writer in order to work properly.

The problems with this system started when I was asked to implement a logging system that wrote data to multiple sources.

For example, my mentors first asked me to send logs to the console and a separate log file. When dealing with two external locations, the repetition might not seem so bad.

As I was developing my logging system, I did debate using a single, unifying method along with some specific parameters to indicate which type of message should be printed.

I decided against the single method because it was less expressive.

Log files are a crucial tool in the development and maintenance of any server.

You must have an account to comment. Please register or login here!