Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

previous timeout doesn`t flush buffer #45

Closed
meyju opened this issue Sep 18, 2014 · 2 comments
Closed

previous timeout doesn`t flush buffer #45

meyju opened this issue Sep 18, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@meyju
Copy link

meyju commented Sep 18, 2014

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',
  ),
)
@driskell driskell self-assigned this Sep 18, 2014
@driskell driskell added this to the 0.14 milestone Sep 18, 2014
@driskell
Copy link
Owner

Ah I can see why. Sorry about that. I'll have a fix for you later today.

@meyju
Copy link
Author

meyju commented Sep 19, 2014

Thank you for the quick fix. It works correctly now.

driskell added a commit that referenced this issue Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants