本文整理匯總了PHP中Illuminate\Log\Writer::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP Writer::info方法的具體用法?PHP Writer::info怎麽用?PHP Writer::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Log\Writer
的用法示例。
在下文中一共展示了Writer::info方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
/**
* @param $domainId
* @param DomainListener $listener
* @return mixed
*/
public function execute($domainId, DomainListener $listener)
{
$domain = $this->repository->getDomainById($domainId);
$sshKey = $this->getPublicKey();
$this->log->info('Show Domain id ' . $domainId, $domain->toArray());
return $listener->view('domains.show', compact('domain', 'sshKey'));
}
示例2: execute
/**
* @param DomainListener $listener
* @return mixed
*/
public function execute(DomainListener $listener)
{
$user = $this->auth->user();
$domains = $this->repository->listOfDomains($user->id);
$this->log->info('Show Domains');
return $listener->view('domains.index', compact('domains'));
}
示例3: execute
/**
* Execute the required command against the command handler.
*
* @param Command $command
* @return mixed
*/
public function execute(Command $command)
{
$handler = $this->commandTranslator->getCommandHandler($command);
$commandName = $this->getCommandName($command);
$this->log->info("New command [{$commandName}]", get_object_vars($command));
return $this->app->make($handler)->handle($command);
}
示例4: storeSupervisordConfig
/**
* Stores The SupervisorD configuration
*
* @param $worker
*/
private function storeSupervisordConfig($worker)
{
$domain = Domain::findOrFail($worker->domain_id);
$file = view('configuration.supervisord', compact('worker', 'domain'))->render();
File::put(Config::get('settings.supervisord_location') . '/worker-' . $worker->id . '.log', $file);
$this->log->info('Supervisord Config created');
}
示例5: api
/**
* @return mixed
*/
public function api()
{
$args = func_get_args();
if (self::$laravelDebug === true) {
$this->laravelLog->info('Facebook Api Call: ' . print_r($args, 1));
}
return call_user_func_array("parent::api", $args);
}
示例6: dispatch
/**
* @param array $events
*/
public function dispatch(array $events)
{
foreach ($events as $event) {
$eventName = $this->getEventName($event);
$this->event->fire($eventName, $event);
$this->log->info("{$eventName} was fired.");
}
}
示例7: dispatch
/**
* Dispatches the array of events, firing off the appropriate event name for each and logging the event fired.
*
* @param array $events
*/
public function dispatch(array $events)
{
foreach ($events as $event) {
$eventName = $this->getEventName($event);
$this->log->info("New event [{$eventName}]", get_object_vars($event));
$this->event->fire($eventName, $event);
}
}
示例8: execute
public function execute($domainId, $envData, EnvironmentsListener $listener)
{
if (empty($envData['environment'])) {
$envData['environment'] = 'production';
}
$environment = $this->repository->addEnvironment($domainId, $envData);
$this->log->info('Environment variable added', $environment->toArray());
return $listener->environmentRedirect($environment);
}
示例9: dispatch
/**
* Release the events on the event stack.
*
* @param array $events
*/
public function dispatch(array $events)
{
// For every Event's on the event array
// It will get the event name from the object Namespace the fire that event
// Also will write that in the log file as an information log
foreach ($events as $event) {
$eventName = $this->getEventName($event);
$this->event->fire($eventName, $event);
$this->log->info("{$eventName} was fired");
}
}
示例10: dispatch
/**
* Dispatch the events
*
* @param array $events
* @param bool $log
*/
public function dispatch(array $events, $log = false)
{
foreach ($events as $event) {
// Get the name of the event
$eventName = $this->getEventName($event);
// Fire the event
$this->event->fire($eventName, [$event]);
if ($log) {
// Log that the event was fired
$this->logger->info("Event [{$eventName}] was fired.");
}
}
}
示例11: postAuthorized
/**
* Handles authenticating that a user/character is still valid.
*
* @return \Illuminate\Http\JsonResponse
*/
public function postAuthorized()
{
// Get the neccessary headers from the request.
$service = $this->request->header('service', false);
$username = $this->request->header('username', '');
$character = $this->request->header('character', '');
$this->log->info('A service is attempting to validate a user.', ['username' => $username, 'character' => $character, 'service' => $service]);
// Verify that the external service exists in the configuration.
if (!$service || !$this->config->get("addon.auth.{$service}")) {
$this->log->info(self::ERROR_INVALID_EXTERNAL_SERVICE, ['service' => $service]);
return $this->failure(self::ERRNO_INVALID_EXTERNAL_SERVICE, self::ERROR_INVALID_EXTERNAL_SERVICE);
}
// Check the cache first so the api isn't hammered too badly.
$key = 'auth:session:' . sha1("{$service}:{$username}");
if ($this->cache->has($key)) {
$this->log->info('Returning the cached authorization result.');
return $this->cache->get($key);
}
// Attempt to find the requested user.
$identifier = filter_var($username, FILTER_VALIDATE_EMAIL) ? 'email' : 'name';
$user = $this->users->where($identifier, $username)->first() ?: false;
if (!$user) {
$this->log->info(self::ERROR_USER_NOT_FOUND);
return $this->failure(self::ERRNO_USER_NOT_FOUND, self::ERROR_USER_NOT_FOUND);
}
// Get and cache the response for 15 minutes.
$response = $this->getLoginResult($user, $service, $character);
$this->cache->put($key, $response, $this->carbon->now()->addMinutes(15));
return $response;
}
示例12: sysmessage
public function sysmessage(Request $request, Crypt $crypt)
{
$logger = new Writer(new Logger("output"));
$logger->useFiles('php://stdout');
$raw = $GLOBALS['HTTP_RAW_POST_DATA'];
$logger->info('raw post:');
$logger->info(var_export($raw, true));
$data = $this->process($raw);
$logger->info(var_export($data, true));
// $errCode = $crypt->decryptMsg($raw->ComponentVerifyTicket, $raw->CreateTime, $nonce, $from_xml, $msg);
echo 'success';
return;
/*
if ($errCode == 0) {
$logger->info('after decrypt:');
$logger->info(var_export($msg, true));
} else {
$logger->info('Err: '.$errCode);
}
*/
echo 'success';
}
示例13: logMessage
/**
* Logs that a message was sent.
*
* @param $message
*/
protected function logMessage($message)
{
$numbers = implode(" , ", $message->getTo());
$message = $message->getText();
//dump($message);
$mode = "fake";
$delivered = $this->delivered();
if (!$this->isPretending()) {
$mode = 'actual';
$delivered = $this->driver->delivered();
//dump($delivered);
}
$delivered = $delivered ? 'SUCCESS' : 'FAILED';
$this->logger->info("#MODE: {$mode} #DELIVERED: {$delivered} #MESSAGE: {$message} #NUMBER: {$numbers} ");
}
示例14: execute
public function execute($appId, $appData, AppListener $listener)
{
$app = $this->repository->updateRepository($appId, $appData);
$this->log->info('Branch Updated', $app->toArray());
return $listener->appRedirect($app);
}
示例15: destroyConfiguration
/**
* Removes the file from storage
*
* @param $worker
*/
private function destroyConfiguration($worker)
{
$this->log->info('Worker File removed');
File::delete(Config::get('settings.supervisord_location') . '/worker-' . $worker->id . '.log');
}