summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-10-16 21:42:24 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-10-16 21:42:24 +0200
commitb0127e39188f2268dbd74714e5d2f0e1a2b6ce7b (patch)
tree63b365930c0232613f28ffbd477202f857fdabee /lib/db.php
parentd9372ac76606cd10e680852dde090171f04f5dee (diff)
downloadnextcloud-server-b0127e39188f2268dbd74714e5d2f0e1a2b6ce7b.tar.gz
nextcloud-server-b0127e39188f2268dbd74714e5d2f0e1a2b6ce7b.zip
use OC_Log instead of error_log
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/db.php b/lib/db.php
index ef6d1dcc8b7..fa3995be125 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -161,9 +161,8 @@ class OC_DB {
// Die if we could not connect
if( PEAR::isError( self::$MDB2 )){
echo( '<b>can not connect to database, using '.$type.'. ('.self::$MDB2->getUserInfo().')</center>');
- $error = self::$MDB2->getMessage();
- error_log( $error);
- error_log( self::$MDB2->getUserInfo());
+ OC_Log::write('core',self::$MDB2->getUserInfo(),OC_Log::FATAL);
+ OC_Log::write('core',self::$MDB2->getMessage(),OC_Log::FATAL);
die( $error );
}
@@ -195,7 +194,7 @@ class OC_DB {
if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
- error_log( $entry );
+ OC_Log::write('core',$entry,OC_Log::FATAL);
die( $entry );
}
}else{
@@ -204,7 +203,7 @@ class OC_DB {
}catch(PDOException $e){
$entry = 'DB Error: "'.$e->getMessage().'"<br />';
$entry .= 'Offending command was: '.$query.'<br />';
- error_log( $entry );
+ OC_Log::write('core',$entry,OC_Log::FATAL);
die( $entry );
}
$result=new PDOStatementWrapper($result);