本文整理汇总了PHP中Illuminate\Support\Facades\Log::notice方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::notice方法的具体用法?PHP Log::notice怎么用?PHP Log::notice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Log
的用法示例。
在下文中一共展示了Log::notice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($card_id, $card_number, $pin)
{
$this->card = GiftCard::find($card_id);
Log::notice("card_id:" . $this->card->id);
$this->card_number = $card_number;
$this->pin = $pin;
}
示例2: doesNotContainSomeSay
protected function doesNotContainSomeSay($row)
{
$contains = str_contains($row['quote'], 'Some say');
if (!$contains) {
Log::notice('Quote does not contain Some say.', ['quote' => $row['quote']]);
return true;
}
return false;
}
示例3: getDelete
public function getDelete($incident_id, Request $request)
{
$incident = ServerIncident::findOrFail($incident_id);
if (!$this->can_edit($incident->char_id, $request->user())) {
abort('403', 'You do not have the required permission');
}
$char_id = $incident->char_id;
Log::notice('perm.incidents.delete - Incident has been deleted', ['user_id' => $request->user()->user_id, 'incident_id' => $incident->id]);
$incident->delete();
return redirect()->route('server.chars.show.get', ['char_id' => $char_id]);
}
示例4: resetPin
private function resetPin()
{
$sv = new StoredValue();
$resetResponse = $sv->changePin($this->card_number);
if ($resetResponse->getErrorCode() != 0) {
Log::error('unable to reset pin');
//discard or retry
}
Log::notice('pin after reset while sending purchase mail ' . $resetResponse->getCardPin());
return $resetResponse->getCardPin();
}
示例5: updateMatches
public function updateMatches()
{
Log::notice("Matches updated at " . date("Y-m-d H:i:s", time()));
$this->updateResultType(10);
/*
* Iterates over all matches, creates them if not present, updates if still open
*/
foreach ($this->matches as $key => $match_json) {
$teams = $this->findOrCreateTeams($match_json);
$match = Match::findOrNew($match_json['match']);
// If match doesn't exist, or is not closed yet
if (!$match || !$match['closed']) {
$this->populateMatch($match, $match_json, $teams);
}
}
}
示例6: index
public function index()
{
if (Request::input('l')) {
LaravelLogViewer::setFile(base64_decode(Request::input('l')));
}
if (Request::input('dl')) {
Log::notice('perm.log.site.download - SiteLog downloaded', ['user_id' => Request::user()->user_id]);
return Response::download(LaravelLogViewer::pathToLogFile(base64_decode(Request::input('dl'))));
} elseif (Request::has('del')) {
File::delete(LaravelLogViewer::pathToLogFile(base64_decode(Request::input('del'))));
Log::notice('perm.log.site.delete - SiteLog deleted', ['user_id' => Request::user()->user_id]);
return Redirect::to(Request::url());
}
$logs = LaravelLogViewer::all();
Log::notice('perm.log.site.view - SiteLog opened', ['user_id' => Request::user()->user_id]);
return View::make('laravel-log-viewer::log', ['logs' => $logs, 'files' => LaravelLogViewer::getFiles(true), 'current_file' => LaravelLogViewer::getFileName()]);
}
示例7: setNode
/**
* Set value to a single node
*/
protected function setNode($path, $nodeTree)
{
// make sure we have the given node on tree
if (!TraverseArray::has($nodeTree, $path)) {
throw new MyceliumException("Inconsistent data with set-paths.");
}
// get the value
$value = TraverseArray::get($nodeTree, $path);
// set the value
try {
// try without forcing first
try {
$this->mycelium->set($path, $value);
} catch (ExtendingPrimitiveNodeException $e) {
// ok, let's force it
$this->mycelium->set($path, $value, true);
// log that we had to force
Log::notice("When saving mycelium node, force was needed.", ["path" => $path]);
}
} catch (Exception $e) {
throw new MyceliumException("An exception has been raised during node setting.");
}
}
示例8: removeWhitelist
public function removeWhitelist($player_id, $whitelist, Request $request)
{
if ($request->user()->cannot('server_players_whitelists_edit')) {
abort('403', 'You do not have the required permission');
}
//Get Server Player
$player = ServerPlayer::findOrFail($player_id);
$player->strip_player_whitelist_flag($whitelist, $request->user()->username_clean);
Log::notice('perm.whitelist.remove - Whitelist has been removed', ['user_id' => $request->user()->user_id, 'whitelist' => $whitelist, 'player_ckey' => $player->ckey]);
return redirect()->route('server.players.show', ['player_id' => $player_id]);
}
示例9: removeUser
public function removeUser(Request $request, $role_id)
{
if ($request->user()->cannot('site_roles_edit')) {
abort('403', 'You do not have the required permission');
}
$role = SiteRole::findOrFail($role_id);
$user = ForumUserModel::findOrFail($request->input('user'));
$user->roles()->detach($role);
Log::notice('perm.site_role.remove_user - Site Role User removed', ['user_id' => $request->user()->user_id, 'role_id' => $role->id, 'role_name' => $role->name, 'target_user_id' => $user->user_id, 'target_user_name' => $user->username_clean]);
return redirect()->route('site.roles.edit.get', ['role_id' => $role_id]);
}
示例10: notice
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
*
* @return bool
*/
public function notice($message, array $context = [])
{
return Log::notice($message, $context);
}
示例11: hint
/**
* Report the notice but prevent the (Laravel) error_handler to throw an exception.
*/
private static function hint($message, $information = null)
{
$handler = set_error_handler('error_log');
restore_error_handler();
if ($handler !== null) {
if (is_array($handler) && is_object($handler[0]) && $handler[0] instanceof \Illuminate\Foundation\Bootstrap\HandleExceptions) {
\Illuminate\Support\Facades\Log::notice($message);
} else {
\Sledgehammer\notice($message, $information);
}
}
}
示例12: unsubscribe
public function unsubscribe($contract, Request $request)
{
$SyndieContract = SyndieContract::findOrfail($contract);
$SyndieContract->remove_subscribers($request->user()->user_id);
Log::notice('perm.contracts.unsubscribe - User Unsubscribed from Contract', ['user_id' => $request->user()->user_id, 'contract_id' => $SyndieContract->contract_id]);
return redirect()->route('syndie.contracts.show', ['contract' => $contract]);
}
示例13: grab_image
public static function grab_image($url, $saveto)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$raw = curl_exec($ch);
curl_close($ch);
try {
if (file_exists($saveto)) {
unlink($saveto);
}
$fp = fopen($saveto, 'x');
fwrite($fp, $raw);
} catch (\Exception $e) {
Log::notice("Failed to download the logo at " . $url);
Log::notice($e);
}
fclose($fp);
}
示例14: flush
/**
* Remove all items from the cache.
*
* @return void
*/
public function flush()
{
if ($this->log_enabled) {
Log::notice("Dumber:flush");
}
// do nothing
}
示例15: notice
/**
* @param $data
* @param array $contextualData
* @param array $location
*/
public static function notice($data, array $location = [], array $contextualData = [])
{
$msg = self::renderMessage($data, $location);
/** @noinspection PhpUndefinedMethodInspection */
BaseLog::notice($msg, $contextualData);
}