Netbeans thoughtfully sprinkles Logger.getLogger(this.getClass().getName()).log(Level. […] statements into catch blocks. Now I would like to point them all to a file (and to console).
Every logging tutorial and such only me tells how to get a specific logger to output into a file, but I assume there is a better way than fixing every automatically generated logging statement? Setting a handler for some sort of root logger or something?
I just add the following at startup
You can specify your own values for
LOG_SIZEandLOG_ROTATION_COUNTYou may need adjust the logging level to suit.