Example #1
0
 /**
  * Init error handler
  */
 private function _initErrorHandler()
 {
     $errorHandler = new ErrorHandler($this->app['log_factory']->getLogger('ErrorHandler'));
     $errorHandler->registerExceptionHandler();
     $errorHandler->registerErrorHandler();
     $errorHandler->registerFatalHandler();
 }
// Error log
if (WP_DEBUG == false || !$nataraja) {
    $titulo = 'Falha em Eventos';
    if (WP_DEBUG && !$nataraja) {
        $titulo = 'DEV - Falha em Eventos';
    }
    require_once 'lib/MonologFormatter.class.php';
    if (!file_exists(ABSPATH . '/log/')) {
        die('É necessário existir a pasta ' . ABSPATH . '/log/');
    }
    $log = new Logger('name');
    $mailer = new NativeMailerHandler(TGO_EVENTO_ADMIN, $titulo, TGO_EVENTO_ADMIN);
    $streamHandler = new StreamHandler(ABSPATH . '/log/monolog.log');
    $errHandler = new ErrorHandler($log);
    $errHandler->registerErrorHandler();
    $errHandler->registerExceptionHandler();
    $mailer->setFormatter(new MonologFormatter());
    $log->pushHandler($streamHandler, Logger::WARNING);
    $log->pushHandler($mailer, Logger::WARNING);
}
add_filter('wpseo_locale', 'override_og_locale');
function override_og_locale($locale)
{
    return "pt_BR";
}
// Requires iniciais
include_once 'lib/Cpp.php';
include_once 'functions.php';
include_once 'Shortcodes.php';
include_once 'vendor/TiagoGouvea/DataMapper/DomainObjectAbstract.class.php';
include_once 'vendor/TiagoGouvea/DataMapper/MapperAbstract.class.php';