コード例 #1
0
 public function execute($filterChain)
 {
     // Execute this filter only once
     if ($this->isFirstCall()) {
         if ($this->getParameter("enable") == TRUE) {
             if ($this->getParameter("health_check") == TRUE) {
                 $this->healthCheck();
             }
             if ($this->getParameter("security") == TRUE) {
                 $this->secureRequest();
             }
         }
         $request = $this->getContext()->getRequest();
         $partner_id = $request->getParameter("partner_id");
         if (!$partner_id) {
             $partner_id = $request->getParameter("p");
         }
         if ($partner_id == -1) {
             // add an extra logfile for specific partners - the directory will be the same as the kaltura_prod
             // the name will be p_<partner_id>.log
             $log_path = sfConfig::get("sf_log_dir");
             $logger = sfLogger::getInstance();
             $log = new sfFileLogger();
             $log->initialize(array('file' => $log_path . "/p_{$partner_id}.log"));
             $logger->registerLogger($log);
         }
     }
     // Execute next filter
     $filterChain->execute();
     // use this point to flush all the modified objects in mystatisticsMgr
     myStatisticsMgr::saveAllModified();
 }
コード例 #2
0
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     if (isset($options['file'])) {
         $this->file = $options['file'];
     }
     return parent::initialize($dispatcher, $options);
 }
コード例 #3
0
         }
     }
 }
 $sf_app_config_dir_name = sfConfig::get('sf_app_config_dir_name');
 $sf_debug = sfConfig::get('sf_debug');
 if ($sf_debug) {
     require_once $sf_symfony_lib_dir . '/debug/sfTimerManager.class.php';
     require_once $sf_symfony_lib_dir . '/debug/sfTimer.class.php';
 }
 sfConfig::add(array('sf_default_module' => 'default', 'sf_default_action' => 'index', 'sf_error_404_module' => 'default', 'sf_error_404_action' => 'error404', 'sf_login_module' => 'default', 'sf_login_action' => 'index', 'sf_secure_module' => 'default', 'sf_secure_action' => 'index', 'sf_module_disabled_module' => 'default', 'sf_module_disabled_action' => 'disabled', 'sf_unavailable_module' => 'default', 'sf_unavailable_action' => 'unavailable', 'sf_available' => true, 'sf_use_database' => true, 'sf_use_security' => true, 'sf_use_flash' => false, 'sf_i18n' => true, 'sf_check_symfony_version' => false, 'sf_use_process_cache' => true, 'sf_compressed' => true, 'sf_check_lock' => false, 'sf_escaping_strategy' => 'bc', 'sf_escaping_method' => 'ESC_ENTITIES', 'sf_suffix' => '.', 'sf_no_script_name' => false, 'sf_validation_error_prefix' => '<div class="vf_error">*&nbsp;', 'sf_validation_error_suffix' => '</div>', 'sf_validation_error_class' => 'form_error', 'sf_validation_error_id_prefix' => 'error_for_', 'sf_cache' => false, 'sf_etag' => false, 'sf_web_debug' => false, 'sf_error_reporting' => 4095, 'sf_rich_text_js_dir' => 'js/tiny_mce', 'sf_prototype_web_dir' => '/sf/prototype', 'sf_admin_web_dir' => '/sf/sf_admin', 'sf_web_debug_web_dir' => '/sf/sf_web_debug', 'sf_calendar_web_dir' => '/sf/calendar', 'sf_standard_helpers' => array(0 => 'Partial', 1 => 'Cache', 2 => 'Form', 3 => 'Javascript', 4 => 'I18N', 5 => 'Url'), 'sf_enabled_modules' => array(0 => 'default'), 'sf_charset' => 'utf-8', 'sf_strip_comments' => true, 'sf_autoloading_functions' => NULL, 'sf_timeout' => 180000, 'sf_max_forwards' => 5, 'sf_path_info_array' => 'SERVER', 'sf_path_info_key' => 'PATH_INFO', 'sf_url_format' => 'PATH', 'sf_orm' => 'propel'));
 if (sfConfig::get('sf_logging_enabled', true)) {
     sfConfig::add(array('sf_logging_enabled' => true, 'sf_logging_level' => 'notice', 'sf_logging_rotate' => false, 'sf_logging_period' => 7, 'sf_logging_history' => 10, 'sf_logging_purge' => true));
     $logger = sfLogger::getInstance();
     $logger->setLogLevel(constant('SF_LOG_' . strtoupper(sfConfig::get('sf_logging_level'))));
     $log = new sfFileLogger();
     $log->initialize(array('file' => 'C:\\xampp\\htdocs\\bm400\\log/pmbonline_dev.log'));
     $logger->registerLogger($log);
 }
 if ($file = $configCache->checkConfig($sf_app_config_dir_name . '/app.yml', true)) {
     include $file;
 }
 if (sfConfig::get('sf_i18n')) {
     sfConfig::add(array('sf_i18n_default_culture' => 'id', 'sf_i18n_source' => 'XLIFF', 'sf_i18n_debug' => false, 'sf_i18n_cache' => true, 'sf_i18n_untranslated_prefix' => '[T]', 'sf_i18n_untranslated_suffix' => '[/T]'));
 }
 foreach ((array) sfConfig::get('sf_autoloading_functions', array()) as $callable) {
     sfCore::addAutoloadCallable($callable);
 }
 ini_set('display_errors', $sf_debug ? 'on' : 'off');
 error_reporting(sfConfig::get('sf_error_reporting'));
 if (!sfConfig::get('sf_in_bootstrap') && !$sf_debug && !sfConfig::get('sf_test')) {
     $configCache->checkConfig($sf_app_config_dir_name . '/bootstrap_compile.yml');
コード例 #4
0
<?php

// auto-generated by sfDefineEnvironmentConfigHandler
// date: 2009/08/15 10:45:02
sfConfig::add(array('sf_logging_enabled' => true, 'sf_logging_level' => 'debug', 'sf_logging_rotate' => false, 'sf_logging_period' => 7, 'sf_logging_history' => 10, 'sf_logging_purge' => true));
$logger = sfLogger::getInstance();
$logger->setLogLevel(constant('SF_LOG_' . strtoupper(sfConfig::get('sf_logging_level'))));
$log = new sfWebDebugLogger();
$log->initialize(array());
$logger->registerLogger($log);
$log = new sfFileLogger();
$log->initialize(array('file' => '/Users/takizo/Sites/coscupdemo/log/frontend_dev.log'));
$logger->registerLogger($log);