本文整理汇总了PHP中KalturaLog::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaLog::getInstance方法的具体用法?PHP KalturaLog::getInstance怎么用?PHP KalturaLog::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaLog
的用法示例。
在下文中一共展示了KalturaLog::getInstance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLogger
private static function getLogger()
{
if (!self::$logger) {
if (class_exists('sfLogger')) {
self::$logger = sfLogger::getInstance();
} else {
self::$logger = KalturaLog::getInstance();
}
}
return self::$logger;
}
示例2: initialize
public static function initialize()
{
$dbConfigs = array();
$pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaDatabaseConfig');
foreach ($pluginInstances as $pluginInstance) {
$dbConfigs[] = $pluginInstance->getDatabaseConfig();
}
foreach ($dbConfigs as $dbConfig) {
self::addExtraConfiguration($dbConfig);
}
Propel::setConfiguration(self::$config);
Propel::setLogger(KalturaLog::getInstance());
Propel::initialize();
}
示例3: initialize
public static function initialize()
{
$dbConfigs = self::getExtraDatabaseConfigs();
foreach ($dbConfigs as $dbConfig) {
self::addExtraConfiguration($dbConfig);
}
Propel::setConfiguration(self::$config);
Propel::setLogger(KalturaLog::getInstance());
try {
Propel::initialize();
} catch (PropelException $pex) {
KalturaLog::alert($pex->getMessage());
throw new PropelException("Database error");
}
}
示例4: define
<?php
define('KALTURA_ROOT_PATH', realpath(__DIR__ . '/../'));
define('SF_APP', 'kaltura');
define('SF_ROOT_DIR', KALTURA_ROOT_PATH . '/alpha');
define('MODULES', SF_ROOT_DIR . '/apps/kaltura/modules/');
$sf_symfony_lib_dir = KALTURA_ROOT_PATH . '/vendor/symfony';
$sf_symfony_data_dir = KALTURA_ROOT_PATH . '/vendor/symfony-data';
// symfony bootstraping
require_once "{$sf_symfony_lib_dir}/util/sfCore.class.php";
sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);
// Logger
kLoggerCache::InitLogger(KALTURA_LOG, 'PS2');
sfLogger::getInstance()->registerLogger(KalturaLog::getInstance());
sfLogger::getInstance()->setLogLevel(7);
sfConfig::set('sf_logging_enabled', true);
DbManager::setConfig(kConf::getDB());
DbManager::initialize();
ActKeyUtils::checkCurrent();
sfContext::getInstance()->getController()->dispatch();
示例5: define
define("KALTURA_API_PATH", KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . "api_v3");
require_once KALTURA_API_PATH . DIRECTORY_SEPARATOR . 'VERSION.php';
//defines KALTURA_API_VERSION
require_once KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . 'alpha' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'kConf.php';
// Autoloader
require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php";
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_API_PATH, "lib", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_API_PATH, "services", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "plugins", "*"));
// needed for testmeDoc
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "generator"));
// needed for testmeDoc
KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/api_v3/classMap.cache');
//KAutoloader::dumpExtra();
KAutoloader::register();
// Timezone
date_default_timezone_set(kConf::get("date_default_timezone"));
// America/New_York
// Logger
$loggerConfigPath = KALTURA_API_PATH . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . "logger.ini";
try {
$config = new Zend_Config_Ini($loggerConfigPath);
} catch (Zend_Config_Exception $ex) {
$config = null;
}
KalturaLog::initLog($config);
// for places where kLog is used
kLog::setLogger(KalturaLog::getInstance());