/** * Class controls the logging of error or debug information * @class CLog * @version 1.0 * @file CLog.php * @author Rolf Wessels rolfdw[at]gmail.com * $Revision: 1.2 $ * License: LGPL, see LICENSE Simple example: --------------- if ((12 + 12) == 24) CLog::error("This is correct ??? ",__FILE__,__LINE__); // output // 2006-06-30 02:48:37 : *** ERROR This is correct ??? (F-D:\folder\CLog.php) (#-13) **/ //////////////////// // General settings if (!defined('CLOG_OVERRIDE_ERROR_HANDLER')) define('CLOG_OVERRIDE_ERROR_HANDLER',true); // will display normal errors using this class if (!defined('CLOG_ALLOW_SENDING_EMAIL')) define('CLOG_ALLOW_SENDING_EMAIL',false); if (!defined('CLOG_SEND_EMAIL_TO')) define('CLOG_SEND_EMAIL_TO', "webdev@optical-circuit.com"); if (!defined('CLOG_SEND_EMAIL_SUBJECT')) define('CLOG_SEND_EMAIL_SUBJECT', "Error on Website"); //////////////////// // The levels of warnings/errors if (!defined('CLOG_DEBUG')) define('CLOG_DEBUG', "090"); if (!defined('CLOG_NOTICE')) define('CLOG_NOTICE', "100"); if (!defined('CLOG_WARNING')) define('CLOG_WARNING', "200"); if (!defined('CLOG_ERROR')) define('CLOG_ERROR', "300"); if (!defined('CLOG_FATAL')) define('CLOG_FATAL', "400"); //////////////////// // Where to save the files if (!defined('CLOG_LOG_FILE_PATH')) define('CLOG_LOG_FILE_PATH', "c:\\logs\\"); // remember to add a trailing slash if (!defined('CLOG_LOG_FILE_DEBUG')) define('CLOG_LOG_FILE_DEBUG', "debug.log"); if (!defined('CLOG_LOG_FILE_NOTICE')) define('CLOG_LOG_FILE_NOTICE', "notice.log"); if (!defined('CLOG_LOG_FILE_WARNING')) define('CLOG_LOG_FILE_WARNING', "warning.log"); if (!defined('CLOG_LOG_FILE_ERROR')) define('CLOG_LOG_FILE_ERROR', "error.log"); if (!defined('CLOG_LOG_FILE_FATAL')) define('CLOG_LOG_FILE_FATAL', "fatal.log"); //////////////////// // This defines the levels at which the loggin should take place if (!defined('CLOG_LVL_DISPLAY_LEVEL')) define('CLOG_LVL_DISPLAY_LEVEL', CLOG_NOTICE); // errors from level XX to be displayed on screen if (!defined('CLOG_LVL_WRITE_TO_FILE')) define('CLOG_LVL_WRITE_TO_FILE', CLOG_ERROR); // errors from level XX to be logged to file if (!defined('CLOG_LVL_EMAIL')) define('CLOG_LVL_EMAIL', CLOG_ERROR); // errors from level XX to be emailed to recipients //////////////////// // Format the date for logging if (!defined('CLOG_DEFAULT_DATE_FORMAT')) define('CLOG_DEFAULT_DATE_FORMAT', "Y-m-d"); if (!defined('CLOG_DEFAULT_TIME_FORMAT')) define('CLOG_DEFAULT_TIME_FORMAT', "H:i:s"); if (!defined('CLOG_DEFAULT_DATETIME_FORMAT')) define('CLOG_DEFAULT_DATETIME_FORMAT', CLOG_DEFAULT_DATE_FORMAT.' '.CLOG_DEFAULT_TIME_FORMAT); class CLog { /** * Stores level of current error * @var int */ var $m_level = CLOG_DEBUG; /** * Stores file Name of current error * @var string */ var $m_fileName = "" ; /** * Stores line Number of current error * @var int */ var $m_lineNumber = "0" ; /** * Stores last Error description * @var string */ var $m_lastErrorString = ""; /**************************************************************************************** * CONSTRUCTOR *****************************************************************************************/ function CLog() { } /**************************************************************************************** * Static functions *****************************************************************************************/ /** * Static function to add a notice log * @access public * @return void **/ function notice($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_NOTICE); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a debug log * @access public * @return void **/ function debug($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_DEBUG); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a warning log * @access public * @return void **/ function warning($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_WARNING); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add an error log * @access public * @return void **/ function error($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_ERROR); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); } /** * Static function to add a fatal error and stops the program/script * @access public * @return void **/ function fatal($in_errstr , $in_errfile = NULL, $in_errline = NULL) { $log = new Clog(); $log->set_level(CLOG_FATAL); $log->set_fileName($in_errfile); $log->set_lineNumber($in_errline); $log->log($in_errstr); die(); } /**************************************************************************************** * Main functions *****************************************************************************************/ /** * Main logging function * @access public * @return void **/ function log($in_errstr) { $this->m_lastErrorString = $in_errstr; if ($this->m_level >= CLOG_LVL_DISPLAY_LEVEL) { $this->display_error(); } if ($this->m_level >= CLOG_LVL_WRITE_TO_FILE) { $this->log_to_file(); } if (CLOG_ALLOW_SENDING_EMAIL && $this->m_level >= CLOG_LVL_EMAIL) { $this->email_error(); } } /** * Displays this error/log to screen * @access private * @return void * @author Rolf Wessels rolfdw[at]gmail.com **/ function display_error() { echo '
Der Neunkirchner Firmenlauf geht in die 6. Runde! Zwischen Start und Ziel werden rund 5 km vom und zum MSC / Kino Areal, durch die Innenstadt von Neunkirchen, sowie dem Panorama- und Stadtpark absolviert.
Eingeladen sind wieder alle begeisterten Sportfans in Teams zu drei, sechs oder zehn LäuferInnen bzw. WalkerInnen aus allen Regionen. Wir freuen uns über die Teilnahme von Firmen, Vereine, öffentliche Organisationen, etc.
Eine sportliche Herausforderung für jedes Team mit Highlights wie dem moderierten Gruppen-Warm-Up, Workout-Musik während des Firmenlaufes, der anschließenden After-Run-Party und exklusiven Preisen bei der Siegerehrung für die erfolgreichsten Teams.
Die Neunkirchner Wirte verwöhnen Sie vor Ort wieder mit ihren Köstlichkeiten – Getränke- und Speisebons können bereits online gekauft werden.
Der 6. Neunkirchner Firmenlauf am 18. Juni 2020 findet auf Initiative der Schneider Holding GmbH und der Raiffeisenbank Schneebergland eGen statt.