&reftitle.examples;
Get and set base path ]]> &example.outputs.similar;
Get and set logger ]]> &example.outputs.similar;
Fast write log 'neeke')); SeasLog::info('this is a info log'); SeasLog::notice('this is a notice log'); SeasLog::warning('your {website} was down,please {action} it ASAP!',array('{website}' => 'github.com','{action}' => 'rboot')); SeasLog::error('a error log'); SeasLog::critical('some thing was critical'); SeasLog::alert('yes this is a {messageName}',array('{messageName}' => 'alertMSG')); SeasLog::emergency('Just now, the house next door was completely burnt out! {note}',array('{note}' => 'it`s a joke')); ?> ]]> As the default, seaslog.default_template = "%T | %L | %P | %Q | %t | %M". That's mean,as the default,log record style is: `{dateTime} | {level} | {pid} | {uniqid} | {timeStamp} | {logInfo}`. &example.outputs.similar; seaslog.appender = 1 &example.outputs.similar; seaslog.appender = 2 or seaslog.appender = 3 1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | DEBUG | 21423 | 599157af4e937 | 1466787583.322 | this is a neeke debug <14>1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | INFO | 21423 | 599157af4e937 | 1466787583.323 | this is a info log <13>1 2017-08-27T01:24:59+08:00 vagrant-ubuntu-trusty test/logger[27171]: 2016-06-25 00:59:43 | NOTICE | 21423 | 599157af4e937 | 1466787583.324 | this is a notice log ]]>
Fast count some type of log count value SeasLog get count value of `grep -wc` use system pipe and return to PHP (array or int). ]]> &example.outputs.similar; int(3) ["INFO"]=> int(3) ["NOTICE"]=> int(3) ["WARNING"]=> int(3) ["ERROR"]=> int(6) ["CRITICAL"]=> int(3) ["ALERT"]=> int(3) ["EMERGENCY"]=> int(3) } int(7) int(1) ]]>
Acquisit some type of log list SeasLog get count value of `grep -w` use system pipe and return array to PHP. ]]> &example.outputs.similar; string(83) "2014-02-24 00:14:02 | ERROR | 8568 | 599157af4e937 | 1393172042.717 | test error 3 " [1] => string(83) "2014-02-24 00:14:04 | ERROR | 8594 | 5991576584446 | 1393172044.104 | test error 3 " [2] => string(83) "2014-02-24 00:14:04 | ERROR | 8620 | 1502697015147 | 1393172044.862 | test error 3 " [3] => string(83) "2014-02-24 00:14:05 | ERROR | 8646 | 599159975a9ff | 1393172045.989 | test error 3 " [4] => string(83) "2014-02-24 00:14:07 | ERROR | 8672 | 599159986ec28 | 1393172047.882 | test error 3 " [5] => string(83) "2014-02-24 00:14:08 | ERROR | 8698 | 5991599981cec | 1393172048.736 | test error 3 " } array(2) { [0] => string(83) "2014-02-24 00:14:02 | ERROR | 8568 | 599157af4e937 | 1393172042.717 | test error 3 " [1] => string(83) "2014-02-24 00:14:04 | ERROR | 8594 | 5991576584446 | 1393172044.104 | test error 3 " } ]]>