Delay with LuaUPnP.log

I’ve been doing some luup development and tailing LuaUPnP.log to see debug messages.

However, there seems to be a very large delay between the event being fired and it appearing in the log.

For example a simple luup.log(“TEST_OUTPUT”) , when watched with:
tail -f /var/log/cmh/LuaUPnP.log | grep TEST_OUTPUT

can take up to a minute to display. Is this normal? Is there a way to stop the delay from occuring?

I assume that events in my luup plugin will fire sooner than when they appear in the log?

by default log output is delayed and not too detailed. for development you have to enable ‘verbose logging’. either using the UI (on ‘advanced’ => ‘logs’ check on ‘verbose logging’) or on the CLI:

VerboseLogging.sh enable

once you enable it, the logs will be a lot faster and more detailed. in fact, they’ll have to be rotated much quicker too, or it would fill the available space. that’s why i usually do this:

while true; do tail -f /var/log/LuaUPnP.log | egrep '^5|^0[18]'; done

the [tt]while[/tt] loop restarts the [tt]tail -f[/tt] each time it’s terminated by [tt]logrotate[/tt]; and the [tt]egrep[/tt] helps to read only what’s interesting to me a that time

01: lua errors
08: UPnP actions
50 : luup.log output
51,52: input/output to devices

all this is documented in [url=http://wiki.micasaverde.com/index.php/Luup_Debugging]http://wiki.micasaverde.com/index.php/Luup_Debugging[/url]

Magic, thanks. I enabled Luup debugging by following another tutorial - didn’t see that one.

Thanks again.