1.1 --- a/src/org/sonews/Main.java Sat Sep 10 18:18:05 2011 +0200
1.2 +++ b/src/org/sonews/Main.java Tue Sep 13 19:08:15 2011 +0200
1.3 @@ -45,6 +45,8 @@
1.4
1.5 /** Version information of the sonews daemon */
1.6 public static final String VERSION = "sonews/1.1.0";
1.7 +
1.8 + /** The server's startup date */
1.9 public static final Date STARTDATE = new Date();
1.10
1.11 /**
1.12 @@ -81,13 +83,16 @@
1.13 mlgw = true;
1.14 } else if (args[n].equals("-p")) {
1.15 port = Integer.parseInt(args[++n]);
1.16 - } else if (args[n].equals("-plugin")) {
1.17 + } else if (args[n].equals("-plugin-storage")) {
1.18 System.out.println("Warning: -plugin-storage is not implemented!");
1.19 } else if (args[n].equals("-plugin-command")) {
1.20 try {
1.21 CommandSelector.addCommandHandler(args[++n]);
1.22 } catch (Exception ex) {
1.23 - Log.get().warning("Could not load command plugin: " + args[n]);
1.24 + StringBuilder strBuf = new StringBuilder();
1.25 + strBuf.append("Could not load command plugin: ");
1.26 + strBuf.append(args[n]);
1.27 + Log.get().warning(strBuf.toString());
1.28 Log.get().log(Level.INFO, "Main.java", ex);
1.29 }
1.30 } else if (args[n].equals("-plugin-storage")) {
1.31 @@ -113,10 +118,10 @@
1.32 Log.get().info("Group 'control' created.");
1.33 }
1.34 } catch (StorageBackendException ex) {
1.35 - ex.printStackTrace();
1.36 + Log.get().log(Level.SEVERE, ex.getLocalizedMessage(), ex);
1.37 System.err.println("Database initialization failed with " + ex.toString());
1.38 System.err.println("Make sure you have specified the correct database"
1.39 - + " settings in sonews.conf!");
1.40 + + " settings in sonews.conf!");
1.41 return;
1.42 }
1.43