本文整理汇总了PHP中Logger::output方法的典型用法代码示例。如果您正苦于以下问题:PHP Logger::output方法的具体用法?PHP Logger::output怎么用?PHP Logger::output使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logger
的用法示例。
在下文中一共展示了Logger::output方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output_parameter_is_passed_to_method
/**
* @test
*/
public function output_parameter_is_passed_to_method()
{
$output_file = "/tmp/output.log";
$output = "This is testing.";
$MockFunction = new \PHPUnit_Extensions_MockFunction('file_put_contents', $this);
$MockFunction->expects($this->once())->with($this->equalTo($output_file), $this->equalTo($output), FILE_APPEND)->will($this->returnValue(true));
$Logger = new \Logger($output_file);
$Logger->output($output);
}
示例2: postSend
public function postSend()
{
parent::postSend();
$info = "Gesendet an: " . implode(', ', array_keys($this->all_recipients)) . " von " . $this->From;
Logger::output('mail.log', $info);
}
示例3: foreach
$groupModerator,
$groupAdministrator
]
],
'ConnGroupRight' => [
$groupBenutzer => [$permissionBenutzer],
$groupModerator => [$permissionModerator],
$groupAdministrator => [$permissionAdministrator],
]
];
foreach ($connections as $class => $data) {
foreach ($data as $lkLeft => $lksRight) {
foreach ($lksRight as $lkRight) {
/** @var BaseConnectionObject $connObj */
$connObj = new $class();
$connObj->setLkLeft($lkLeft);
$connObj->setLkRight($lkRight);
DB::beginTransaction();
try {
$connObj->save();
} catch (base_exception_BaseConnectionObject $e) {
Logger::output('install.log', $e->getMessage());
}
DB::endTransaction();
}
}
}
示例4: findSingleConnection
public function findSingleConnection($lkLeft, $lkRight)
{
$table = DB::table($this->getTable());
$where = DB::where($table->getColumn('lkLeft'), DB::intTerm($lkLeft));
$where->addAnd($table->getColumn('lkRight'), DB::intTerm($lkRight));
$selectStatement = new base_database_statement_Select();
$selectStatement->setTable($table);
$selectStatement->setWhere($where);
$result = $selectStatement->fetchDatabase();
if (count($result) > 1) {
Logger::output('BaseConnectionObject.log', "Duplicated entry for '" . get_class($this) . "' with lkLeft '$lkLeft' and lkRight '$lkRight'");
}
if (count($result) == 0) {
return null;
}
$this->_setObject($result);
return $this;
}
示例5: Logger
// Necessary base classes
require 'Logger.php';
require 'Log/Entry.php';
require 'Driver/DriverInterface.php';
// Optional drivers
require 'Driver/Playout/UniversalDriver.php';
require 'Driver/Playout/ClassicalDriver.php';
require 'Driver/Playout/GMLDriver.php';
/**
* Environment (PHP 5.6+)
*/
date_default_timezone_set('Europe/Amsterdam');
/**
* Run
*/
$logger = new Logger($argv);
$logger->registerDriver(new ClassicalDriver());
$logger->registerDriver(new GMLDriver());
$logger->registerDriver(new UniversalDriver());
$logger->run();
/**
* Optional filtering
*/
// $logger->filter(function (Entry $entry) {
// return !empty($entry->itemid);
// });
/**
* Output
*/
$logger->output();
示例6: DB
<?php
require_once 'Logger.php';
require_once 'Item.php';
require_once 'Document.php';
require_once 'DB.php';
require_once 'Parser.php';
$db = new DB();
$parser = new Parser();
$parser->saveItems($db);
Logger::output($parser->toString());
示例7: execute
/**
*
*/
public function execute()
{
ob_start();
if ($this->isExecuteable() === true) {
try {
$this->executeRequest();
} catch (Exception $e) {
// $this->msg = $e->getMessage();
Logger::output('protocol.log', $e->getMessage(). $this->msg);
}
}
// $obGetContents = ob_get_contents();
// if (!empty($obGetContents)) {
// $this->msg .= ' ' . $obGetContents;
// }
ob_clean();
$this->response();
}