/ \copydoc Plop::LoggerInterface::notice().
762766
public function notice(
        $msg,
        array $args = array(),
        \Exception $exception = null
    ) {
        return $this->log(\Plop\NOTICE, $msg, $args, $exception);
    }
1022831
private function print_notification( $notice ) {
        do_action( 'easy_notifications_before_notice', $notice ); 

        echo '<div class="updated '.$notice['type'].'">
            ' . $notice['content'] . ' 

            <a href="#" class="dismiss-notice" 
            data-namespace="' . $this->prefix . '" 
            data-noticeid="' . $notice['id'] . '"
            >Dismiss Notification</a>
            </div>';

        do_action( 'easy_notifications_after_notice', $notice );
    }
1200439
private function registerNotificationMakeCommand()
    {
        $this->app->bindShared('command.make.package.notification', function ($app)
        {
            return new NotificationMakeCommand($app['files'], $app['packages']);
        });

        $this->commands('command.make.package.notification');
    }
74945
public function notice(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->notice($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::NOTICE);
        }
    }
448659
public function alert(
        $msg,
        array $args = array(),
        \Exception $exception = null
    ) {
        return $this->log(\Plop\ALERT, $msg, $args, $exception);
    }
578788
public function log($message = '', $context = [], $level = Logger::NOTICE, $role = 'system', $times = 0, $ttl = 0)
    {
        if ($this->isSingle()) {
            LogComponent::component()->record($message, $context, $level, $role, $times, $ttl);
        }
    }
24365
public function notify()
    {
        $notice['facId'] = isset($_REQUEST['facId']) ? $_REQUEST['facId'] : '';
        $notice['facMemId'] = isset($_REQUEST['facMemId']) ? $_REQUEST['facMemId'] : '';
        $notice['facTradeSeq'] = isset($_REQUEST['facTradeSeq']) ? $_REQUEST['facTradeSeq'] : '';
        $notice['tradeSeq'] = isset($_REQUEST['tradeSeq']) ? $_REQUEST['tradeSeq'] : '';
        $notice['CardId'] = isset($_REQUEST['CardId']) ? $_REQUEST['CardId'] : '';
        $notice['oProjNo'] = isset($_REQUEST['oProjNo']) ? $_REQUEST['oProjNo'] : '';
        $notice['CardKind'] = isset($_REQUEST['CardKind']) ? $_REQUEST['CardKind'] : '';
        $notice['CardPoint'] = isset($_REQUEST['CardPoint']) ? $_REQUEST['CardPoint'] : '';
        $notice['ReturnMsgNo'] = isset($_REQUEST['ReturnMsgNo']) ? $_REQUEST['ReturnMsgNo'] : '';
        $notice['ErrorMsgNo'] = isset($_REQUEST['ErrorMsgNo']) ? $_REQUEST['ErrorMsgNo'] : '';
        $notice['ErrorMsg'] = isset($_REQUEST['ErrorMsg']) ? $_REQUEST['ErrorMsg'] : '';
        $hash = isset($_REQUEST['hash']) ? $_REQUEST['hash'] : '';

        // 签名验证
        $str = '';
        $str .= $this->config['app_key1'];
        $str .= $notice['facId'];
        $str .= $notice['facMemId'];
        $str .= $notice['facTradeSeq'];
        $str .= $notice['tradeSeq'];
        $str .= $notice['CardId'];
        $str .= $notice['oProjNo'];
        $str .= $notice['CardKind'];
        $str .= $notice['CardPoint'];
        $str .= $notice['ReturnMsgNo'];
        $str .= $notice['ErrorMsgNo'];
        $str .= $notice['ErrorMsg'];
        $str .= $this->config['app_key2'];

        $transactionId = $notice['facTradeSeq'];

        if (hash('sha256', $str) != $hash) {
            throw new DefaultException('sign error');
        }

        $result = [
            'isSuccessful'         => true,
            'message'              => 'success',
            'transactionId'        => $transactionId,
            'transactionReference' => $notice['tradeSeq'],
            'amount'               => $notice['CardPoint'],
            'currency'             => 'TWD',
            'raw'                  => $notice,
        ];
        return $result;
    }
1207353
def log(self, message, type='notice'):
        
        if self.logger and not callable(self.logger):
            raise ValueError(u"Invalid logger set, must be a callable")
        if self.verbose and self.logger:
            self.logger(message, type)
205008
public function buildNotice($exc)
    {
        $error = [
            'type' => get_class($exc),
            'message' => $exc->getMessage(),
            'backtrace' => $exc->getTrace()
        ];

        $notice = [
            'errors' => [$error]
        ];
        if (!empty($_REQUEST)) {
            $notice['params'] = $_REQUEST;
        }
        if (!empty($_SESSION)) {
            $notice['session'] = $_SESSION;
        }

        return $notice;
    }
542715
public function logNotice($line, $args = self::NO_ARGUMENTS)
	{
        $this->log($line, self::NOTICE, $args);
    }
549150
def warn_from_util_logger(msg):
    """"""
    global _LOG
    # This check is necessary to avoid infinite recursion when called from get_config, because
    #   the _read_logging_conf can require reading a conf file.
    if _LOG is None and _LOGGING_CONF is None:
        sys.stderr.write('WARNING: (from peyotl before logging is configured) {}\n'.format(msg))
        return
    if _LOG is None:
        _LOG = get_logger("peyotl.utility")
    _LOG.warn(msg)
1302410
protected function addNotice($notice)
    {
        if (!$this->variant) {
            $notice       = trim($notice);
            $this->notice = strlen($notice) ? $this->exportNotice($notice) : null;
        }
    }
186509
public function onAllAdminNotices()
    {
        if (!($notices = $this->get())) {
            return; // Nothing to do.
        }
        $time = time(); // The current time.

        foreach ($notices as $_key => &$_notice) {
            # Catch invalid/corrupted notices.

            if (!is_string($_key) || !is_array($_notice)) {
                unset($notices[$_key]);
                continue; // Ignore.
            }
            # Normalize the notice.

            $_notice = $this->normalize($_notice);

            # Initialize a few variables.

            $_markup           = '';
            $_current_user_can = false;
            $_is_applicable    = false;

            $_class = $this->App::CORE_CONTAINER_SLUG.'-menu-page-area';
            $_class .= ' -notice';
            $_class .= ' notice';

            $_style   = $_notice['style'];
            $_dismiss = ''; // Default; n/a.

            # Check for empty markup.

            if (!($_markup = $_notice['markup'])) {
                unset($notices[$_key]);
                continue; // Ignore.
            }
            # If transient, wipe after a single pass.

            if ($_notice['is_transient']) {
                unset($notices[$_key]);
            }
            # Has notice become too old; i.e., lingering?

            if ($_notice['_insertion_time'] < $this->outdated_notice_time
                && /* Not intentially delayed. */ $_notice['delay_until_time'] < $time) {
                unset($notices[$_key]); // Ancient history after this pass.
            }
            # Check conditions; i.e., is notice applicable?

            if (!$this->currentUserCan($_notice)) {
                continue; // Do not display.
            } elseif (!$this->isApplicableContext($_notice)) {
                continue; // Do not display.
            } elseif (!$this->isApplicablePage($_notice)) {
                continue; // Do not display.
            } elseif ($_notice['delay_until_time'] > $time) {
                continue; // Do not display.
            } elseif ($_notice['recurs_every'] && $_notice['_last_recur_dismiss_time']
                && $_notice['_last_recur_dismiss_time'] + $_notice['recurs_every'] > $time) {
                continue; // Do not display; not time to recur yet, based on last time.
            }
            # If `is_applicable` is a closure, check it's return value also.

            if ($this->c::isSerialized($_notice['is_applicable'])) {
                try { // Maybe catch exceptions here.
                    $_is_applicable = $this->c::unserializeClosure($_notice['is_applicable']);
                    $_is_applicable = $_is_applicable($this->App); // Should return (bool) or `null`.
                    $_is_applicable = $_is_applicable === null ? $_is_applicable : (bool) $_is_applicable;

                    // NOTE: A special return value of `null` indicates the notice
                    // is no longer applicable (at all) and should be dequeued entirely.

                    if ($_is_applicable === null) {
                        unset($notices[$_key]);
                        continue; // Ignore.
                    } elseif (!$_is_applicable) {
                        continue; // Do not display.
                    }
                } catch (\Throwable $Throwable) {
                    unset($notices[$_key]); // Avoid repeats.

                    if ($this->App->Config->©debug['©enable']) {
                        throw $Throwable;
                    }
                    continue; // Ignore.
                }
            }
            # If `markup` is a closure, call upon the closure now.

            if ($this->c::isSerialized($_notice['markup'])) {
                try { // Maybe catch exceptions here.
                    $_markup = $this->c::unserializeClosure($_notice['markup']);
                    $_markup = (string) $_markup($this->App); // Should return a string.

                    // NOTE: A special return value (empty) indicates the notice
                    // is no longer applicable (at all) and should be dequeued entirely.

                    if (!$_markup) {
                        unset($notices[$_key]);
                        continue; // Ignore.
                    }
                } catch (\Throwable $Throwable) {
                    unset($notices[$_key]); // Avoid repeats.

                    if ($this->App->Config->©debug['©enable']) {
                        throw $Throwable;
                    }
                    continue; // Ignore.
                }
            }
            # Setup notice classes for CSS in WP core.

            switch ($_notice['type']) {
                case 'info':
                    $_class .= ' notice-info';
                    break; // Blue coloration.

                case 'success':
                    $_class .= ' notice-success';
                    break; // Green coloration.

                case 'warning':
                    $_class .= ' notice-warning';
                    break; // Orange/yellow coloration.

                case 'error':
                    $_class .= ' notice-error';
                    break; // Red coloration.

                default: // Default (info).
                    $_class .= ' notice-info';
            }
            // Create dismiss icon if applicable.

            if ($_notice['is_persistent'] && $_notice['is_dismissable']) {
                // $_class .= ' is-dismissible';
                // We use a different approach for dismissals.

                $_style .= ' padding-right:38px; position:relative;';
                $_dismiss = '<a class="notice-dismiss" style="text-decoration:none;" href="'.esc_attr($this->dismissUrl($_key)).'">'.
                                '<span class="screen-reader-text">'.__('Dismiss this notice.', 'wp-sharks-core').'</span>'.
                            '</a>';
            }
            # Make sure markup is wrapped in a block-level tag so margins will exist.

            $_markup = $this->c::mbTrim($_markup); // Before checking.
            if (!preg_match('/^\<(?:p|div|form|h[1-6]|ul|ol)[\s>]/ui', $_markup)) {
                $_markup = '<p>'.$_markup.'</p>'; // Add `<p>` tag.
            }
            # Display notice `<div>` with the markup and a possible dismiss icon.

            echo '<div class="'.esc_attr($_class).'" style="'.esc_attr($_style).'">'.
                    $_markup.$_dismiss.// Possible dismiss icon.
                 '</div>';

            # Notice seen. Handle queue state logic now.

            if ($_notice['is_persistent']) {
                continue; // Persistent; do nothing.
                // See {@link dismiss()} for recurring + persistent notice handling.
                // A recurring + persistent notice is counted/updated when it's dismissed.
                // If it's not dismissable, then it simply remains until dequeued manually.
            } elseif ($_notice['recurs_every']) {
                ++$_notice['_recurrences']; // Update counter.

                if ($_notice['_recurrences'] < $_notice['recurs_times']) {
                    $_notice['_last_recur_dismiss_time'] = $time;
                } else {
                    unset($notices[$_key]); // Dequeue.
                }
            } else {
                unset($notices[$_key]); // Dequeue.
            }
        } // unset($_key, $_notice, $_markup, $_current_user_can, $_is_applicable, $_class, $_style, $_dismiss);

        $this->update($notices);
    }
591522
protected function exportNotice($notice)
    {
        $docDirectoryPath = strtr($this->getDocumentationDirectory(true), [DIRECTORY_SEPARATOR => '/']).'/';

        return preg_replace_callback('/\[([^\]]*?)\]\(([^\)]*?)\)/', function($match) use ($docDirectoryPath) {
            return '['.$match[1].']('
                   .(preg_match('%^https?\:\/\/%i', $match[2]) ? '' : $docDirectoryPath)
                   .$match[2].')';
        }, $notice);
    }
96854
public function info(
        $msg,
        array $args = array(),
        \Exception $exception = null
    ) {
        return $this->log(\Plop\INFO, $msg, $args, $exception);
    }
847942
public function call($args = [])
    {
        if (count($args) == 0 || empty($args[2]))
            throw new NoticeException('Command "'.$this->key.'": Expecting a setting (version).');

        $object = explode(':', $args[2]);

        // Validations
        if (!in_array($object[0], ['version']))
            throw new NoticeException('Command "'.$this->key.'": Invalid setting. Expecting version.');

        switch ($object[0]) {
            case 'version':
                // Validate second parameter
                if ($object[0] === 'version' && !isset($object[1]))
                    throw new NoticeException('Command "'.$this->key.'": Expecting a version.');
                $this->setVersion($object[1]);
                break;
        }
    }
290671
public void notice(String key, Object... args) {
        if (!configuration.quiet) {
            report(NOTE, resources.getText(key, args));
        }
    }