SeasLog::flushBuffer

(PECL seaslog >=1.0.0)

SeasLog::flushBuffer����־����ˢ�µ������У��ļ����ʣ����߷��͵�Զ�˵� TCP/UDP �����ַ��

˵��

public static SeasLog::flushBuffer ( void ) : bool

����־���水�� seaslog.appender ˢ�µ����ʣ� �ļ����ʣ����͵�Զ�˵� TCP/UDP �����ַ��

Note:

ͬʱ�����⣺ seaslog.appender_retry seaslog.remote_host seaslog.remote_port

����

�˺���û�в�����

����ֵ

ˢ�³ɹ����� TRUE��ʧ�ܷ��� FALSE��

����

Example #1 SeasLog::flushBuffer() example

<?php

SeasLog
::info('info log');
SeasLog::debug('debug log');
var_dump(SeasLog::getBuffer());
var_dump(SeasLog::flushBuffer());
var_dump(SeasLog::getBuffer());

?>

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

array(1) {
  ["/var/log/www/default/20180707.log"]=>
  array(2) {
    [0]=>
    string(79) "2018-07-07 10:47:58 | INFO | 71910 | 5b4029ded6009 | 1530931678.877 | info log
"
    [1]=>
    string(81) "2018-07-07 10:47:58 | DEBUG | 71910 | 5b4029ded6009 | 1530931678.877 | debug log
"
  }
}
bool(true)
array(0) {
}

�μ�