Avoid using stdout for debug logging.
@@ -36,23 +36,18 @@ public class StandaloneMain {
void run(String bundleLocation) {
try {
- // We're not logging at this point since the application is responsible
- // for setting up logging.
- System.out.println("debug\tInitializing application without privileges.");
+ log.log(Level.FINE, "Initializing application without privileges.");
setupSignalHandlers();
loader.init(bundleLocation, false);
loader.start();
waitForShutdown();
- System.out.println("debug\tTrying to shutdown in a controlled manner.");
log.log(Level.INFO, "JDisc shutting down");
loader.stop();
- System.out.println("debug\tTrying to clean up in a controlled manner.");
+ log.log(Level.FINE, "Trying to clean up in a controlled manner.");
loader.destroy();
- System.out.println("debug\tStopped ok.");
+ log.log(Level.FINE, "Stopped ok.");
System.exit(0);
} catch (Throwable e) {
- System.out.print("debug\tUnexpected: ");
- e.printStackTrace();
log.log(Level.SEVERE, "JDisc exiting: Throwable caught: ", e);
System.exit(6);
}
