/usr/share/pgfouine/include/ErrorLogObject.class.php is in pgfouine 1.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | <?php
/*
* This file is part of pgFouine.
*
* pgFouine - a PostgreSQL log analyzer
* Copyright (c) 2005-2008 Guillaume Smet
*
* pgFouine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* pgFouine is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with pgFouine; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class ErrorLogObject extends LogObject {
var $hint = '';
var $detail = '';
var $error = '';
var $textIsAStatement = false;
function ErrorLogObject($connectionId, $user, $db, $text = 'No error message') {
$this->error = $text;
$this->LogObject($connectionId, $user, $db, $text);
}
function getEventType() {
return EVENT_ERROR;
}
function appendStatement($text) {
if(DEBUG > 1 && empty($text)) stderr('Empty text for error statement', true);
// the text may have been appended so we copy it in error before overwriting it
$this->error = $this->text;
$this->text = $text;
$this->textIsAStatement = true;
}
function appendHint($hint) {
if(DEBUG > 1 && empty($hint)) stderr('Empty text for error hint', true);
$this->hint = $hint;
}
function appendDetail($detail) {
if(DEBUG > 1 && empty($detail)) stderr('Empty text for error detail', true);
$this->detail = $detail;
}
function appendContext($context) {
if(DEBUG > 1 && empty($context)) stderr('Empty text for error context', true);
$this->setContext($context);
}
function isIgnored() {
if(parent::isIgnored() ||
$this->error == 'terminating connection due to administrator command' ||
$this->error == 'the database system is shutting down'
) {
return true;
} else {
return false;
}
}
function getError() {
return $this->error;
}
function getHint() {
return $this->hint;
}
function getDetail() {
return $this->detail;
}
function isTextAStatement() {
return $this->textIsAStatement;
}
}
?>
|