log-courier
log-courier copied to clipboard
previous timeout doesn`t flush buffer
I have added the multiline codec to collect logmessages from an php application logfile with php stacktraces.
The last log event isn't send to logstash and with lc-admin I can see there a pending lines. Only when a new message is written to the logfile the previous will be send.
My Config is like this (Files section):
{
"paths": [ "/srv/www/logs/php_server_error.log" ],
"fields": { "type": "php_server_error" },
"codec": {
"name": "multiline",
"pattern": "^[[][0-9]{1,2}?-[a-zA-Z]{3}?-[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2} [a-zA-Z/]+?[]]",
"negate": true,
"what": "previous",
"previous timeout": "30s"
}
},
An example log linie is(some path's striped):
[18-Sep-2014 15:59:56 Europe/Berlin] exception 'Core_ErrorException' with message 'Illegal string offset 'result'' in /srv/www/PHP_ROOT//Action.php:294
Stack trace:
#0 /srv/www/PHP_ROOT///Action.php(294): exception_error_handler(2, 'Illegal string ...', '/srv/www/PHP_RO...', 294, Array)
#1 /srv/www/PHP_ROOT//BonusController.php(72): Bonus_Controller_Action->getBonusList(Array)
#2 /srv/www/PHP_ROOT//Action.php(516): Bonus_BonusController->selectedAction()
#3 /srv/www/PHP_ROOT//Standard.php(308): Zend_Controller_Action->dispatch('selectedAction')
#4 /srv/www/PHP_ROOT//Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#5 /srv/www/PHP_ROOT//App.php(550): Zend_Controller_Front->dispatch()
#6 /srv/www/PHP_ROOT/www/index.php(82): Core_App->run()
#7 {main}
Request: selected?format=json&format=json&items=6&random=17&page=1
POST Params:
array (
'__before_filter' =>
array (
),
)
GET Params:
array (
'format' => 'json',
'items' => '6',
'random' => '17',
'page' => '1',
'__before_filter' =>
array (
'format' => 'json',
'items' => '6',
'random' => '17',
'page' => '1',
),
)
Ah I can see why. Sorry about that. I'll have a fix for you later today.
Thank you for the quick fix. It works correctly now.