genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
392 stars 155 forks source link

Linux logging needs to be flushed #202

Closed Fmstrat closed 8 years ago

Fmstrat commented 9 years ago

When using the init.d script, HomeGenie is not flushing the log on each entry. This creates logs that stop at random points, such as:

2015-08-13T16:56:54.5099150-04:00       HomeAutomation.HomeGenie.Automation     1019    Automation Program      Program.Status  Running
2015-08-13T16:56:54.5123360-04:00       HomeAutomation.HomeGenie.Automation     1019    Automation Program      Program.Status  Idle
2015-08-13T16:56:54.5884160-04:00       MIG.Gatew

Basically:

Thanks.

genemars commented 9 years ago

this is a wanted behavior to prevent FS stressing on SD-card media devices

Fmstrat commented 9 years ago

How about an option under Maintenance>Logging that allows for instant flushing? I'm running on a flash device, but many of us use a ramdisk for /var/log and /tmp to overcome the above issue and would prefer instant logging if possible. Thanks.

genemars commented 8 years ago

FYI, HG 1.1 is now using NLog which has a bunch of configuration options. https://github.com/genielabs/HomeGenie/tree/wip-1.1

genemars commented 8 years ago

https://github.com/nlog/NLog/wiki/Configuration-file

Fmstrat commented 8 years ago

Nice. I'm guessing by default BufferingWrapper will be turned on?