searchdaimon / enterprise-search

An open source search engine for corporate data and websites.
http://www.searchdaimon.com/
GNU General Public License v2.0
107 stars 43 forks source link

No stdout in "run test" output in admin interface #4

Closed dagurval closed 10 years ago

dagurval commented 11 years ago

When running a custom crawler in admin interface, any line written to stdout does not show up in crawler run output.

Anything printed to stderr does however show, for example:

  print {STDERR} "hello world"
runarbu commented 10 years ago

Turns out that this is caused by buffering. It works as expected when you run the crawler manager from the console, but not when you run it as a daemon.

As stated in perlvar “…STDOUT will typically be line buffered if output is to the terminal and block buffered otherwise”. Thus STDOUT is also buffered when run in daemon mode, and will be printed, but it may take a while.