org/sonews/storage/impl/JDBCDatabase.java
changeset 16 5a4a41cfc0a3
parent 14 efce4ec25564
child 24 2ff819fa5be1
     1.1 --- a/org/sonews/storage/impl/JDBCDatabase.java	Thu Aug 20 18:41:21 2009 +0200
     1.2 +++ b/org/sonews/storage/impl/JDBCDatabase.java	Thu Aug 20 21:31:03 2009 +0200
     1.3 @@ -121,7 +121,7 @@
     1.4        this.conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
     1.5        if(this.conn.getTransactionIsolation() != Connection.TRANSACTION_SERIALIZABLE)
     1.6        {
     1.7 -        Log.msg("Warning: Database is NOT fully serializable!", false);
     1.8 +        Log.get().warning("Database is NOT fully serializable!");
     1.9        }
    1.10  
    1.11        // Prepare statements for method addArticle()
    1.12 @@ -360,7 +360,7 @@
    1.13        }
    1.14        catch(SQLException ex2)
    1.15        {
    1.16 -        Log.msg("Rollback of addArticle() failed: " + ex2, false);
    1.17 +        Log.get().severe("Rollback of addArticle() failed: " + ex2);
    1.18        }
    1.19        
    1.20        try
    1.21 @@ -369,7 +369,7 @@
    1.22        }
    1.23        catch(SQLException ex2)
    1.24        {
    1.25 -        Log.msg("setAutoCommit(true) of addArticle() failed: " + ex2, false);
    1.26 +        Log.get().severe("setAutoCommit(true) of addArticle() failed: " + ex2);
    1.27        }
    1.28  
    1.29        restartConnection(ex);
    1.30 @@ -1486,7 +1486,7 @@
    1.31        }
    1.32        else
    1.33        {
    1.34 -        Log.msg("Warning: Count on postings return nothing!", true);
    1.35 +        Log.get().warning("Count on postings return nothing!");
    1.36          return 0;
    1.37        }
    1.38      }
    1.39 @@ -1696,8 +1696,8 @@
    1.40      throws StorageBackendException
    1.41    {
    1.42      restarts++;
    1.43 -    Log.msg(Thread.currentThread() 
    1.44 -      + ": Database connection was closed (restart " + restarts + ").", false);
    1.45 +    Log.get().severe(Thread.currentThread()
    1.46 +      + ": Database connection was closed (restart " + restarts + ").");
    1.47      
    1.48      if(restarts >= MAX_RESTARTS)
    1.49      {
    1.50 @@ -1715,7 +1715,7 @@
    1.51      }
    1.52      catch(InterruptedException ex)
    1.53      {
    1.54 -      Log.msg("Interrupted: " + ex.getMessage(), false);
    1.55 +      Log.get().warning("Interrupted: " + ex.getMessage());
    1.56      }
    1.57      
    1.58      // Try to properly close the old database connection
    1.59 @@ -1728,7 +1728,7 @@
    1.60      }
    1.61      catch(SQLException ex)
    1.62      {
    1.63 -      Log.msg(ex.getMessage(), true);
    1.64 +      Log.get().warning(ex.getMessage());
    1.65      }
    1.66      
    1.67      try
    1.68 @@ -1738,7 +1738,7 @@
    1.69      }
    1.70      catch(SQLException ex)
    1.71      {
    1.72 -      Log.msg(ex.getMessage(), true);
    1.73 +      Log.get().warning(ex.getMessage());
    1.74        restartConnection(ex);
    1.75      }
    1.76    }