Java Util Logger has enabled us to ship application without having dependency on any external JARs or APIs for logging purpose. After starting to use it I felt the necessity of a Logger creation tool which will create and initialize a logger for me instead of me either writing it or Copy-Pasting it for every file or worse every class. Also using a tool will enable me to maintain a coherence of naming and initialization of loggers across a project.
With the release of Java Source API with NetBeans 6.1Beta I finally got the chance to write such a tool for myself :). In sequence with my toString() generator module I started this module as well. You can download the NBM file and install it as it is free and open source. How-to of this tool is as follows.
Basically what I needed for it can be stated in 3 steps -
- Parse/read the Java File
- Find declared classes
- Check if Logger exists if not create it and add utility methods.


1 comments:
it seems very helpful tool, so we can let our tool handle or add logger related function with in the source code.
thanks for nice work
Post a Comment