SeasLog::info

(PECL seaslog >=1.0.0)

SeasLog::infoRecord info log information

˵��

public static SeasLog::info ( string $message [, array $content [, string $logger ]] ) : bool

��¼ info ��־

Note:

"INFO" - ��Ҫ�¼���ǿ��Ӧ�ó�������й��̡�

����

message

The log message.

content

"��Ϣ"����ռλ����ʵ���� content �����е�ֵ�滻��Щռλ���� ����'��Ϣ'�� `log info from {NAME}`, '����'�� `array('NAME' => neeke)`�� ��־��Ϣ�� `log info from neeke`

logger

���������� SeasLog::setLogger() ʱ��������ʱ logger һ�����ڵ�����������ʹ�����"logger"�� ��� `logger` ΪNULL �� ""����ô SeasLog ��ʹ����SeasLog::setLogger()���õ�������־��¼����

����ֵ

��¼��־��Ϣ�ɹ����� TRUE��ʧ�ܷ��� FALSE��

����

Example #1 SeasLog::info() example

<?php

var_dump
(SeasLog::info('log message'));

//with content
var_dump(SeasLog::info('log message from {NAME}',array('NAME' => 'neeke')));

//with tmp logger
var_dump(SeasLog::info('log message from {NAME}',array('NAME' => 'neeke'),'tmp_logger'));

var_dump(SeasLog::getBuffer());

?>

�������̵���������ڣ�

bool(true)
bool(true)
bool(true)
array(2) {
  ["/var/log/www/default/20180707.log"]=>
  array(2) {
    [0]=>
    string(81) "2018-07-07 11:45:49 | INFO | 73263 | 5b40376d1067c | 1530935149.68 | log message
"
    [1]=>
    string(92) "2018-07-07 11:45:49 | INFO | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke
"
  }
  ["/var/log/www/tmp_logger/20180707.log"]=>
  array(1) {
    [0]=>
    string(92) "2018-07-07 11:45:49 | INFO | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke
"
  }
}

�μ�