SeasLog::getBuffer
(PECL seaslog >=1.0.0)
SeasLog::getBuffer — Get the logs buffer in memory as array
パラメータ
この関数にはパラメータはありません。
戻り値
Return an array from logs buffer in memory.
例
例1 SeasLog::getBuffer() example
<?php
var_dump(SeasLog::info('info log'));
var_dump(SeasLog::debug('debug log'));
var_dump(SeasLog::getBuffer());
?>
上の例の出力は、 たとえば以下のようになります。
bool(true) bool(true) array(1) { ["/var/log/www/default/20180707.log"]=> array(2) { [0]=> string(79) "2018-07-07 10:43:32 | INFO | 71785 | 5b4028d4c58d5 | 1530931412.810 | info log " [1]=> string(81) "2018-07-07 10:43:32 | DEBUG | 71785 | 5b4028d4c58d5 | 1530931412.810 | debug log " } }
参考
- seaslog.use_buffer
- seaslog.buffer_size
- seaslog.buffer_disabled_in_cli
- SeasLog::getBufferEnabled() - Determin if buffer enabled
- SeasLog::flushBuffer() - Flush logs buffer, dump to appender file, or send to remote api with tcp/udp
+add a note
User Contributed Notes
There are no user contributed notes for this page.
↑ and ↓ to navigate •
Enter to select •
Esc to close
Press Enter without
selection to search using Google