[OSM-dev] How to make osm2pgsql quiet?
svavar at kjarrval.is
Wed Dec 19 13:59:34 GMT 2012
On 19/12/12 13:36, Sven Geggus wrote:
> Svavar Kjarrval <svavar at kjarrval.is> wrote:
>> I was wondering what methods you use to make osm2pgsql be quiet when run
>> by crontab.
> Why calling it directly instead calling a wrapper script?
I do use a wrapper script which is called from crontab.
> At least if you go for incremental updates you need to run a wrapper
> script anyway because this will also involve calling osmosis.
> The relevant part of our script "replicate-loop.sh" on the german
> tileserver looks like this:
> osm2pgsql ... >/path/to/logfile/osm2pgsql.stdout 2>/path/to/logfile/osm2pgsql.stderr
Thanks for the help. For some reason > /dev/null 2>&1 did work when I
tried it this time. Don't know why it didn't work but I guess I made a
mistake when trying it before. Took the advice and now the output goes
to logfiles, most of it to the stderr file for some reason. At least
crontab is finally quiet again.
It would be better though if osm2pgsql did implement a quiet option so
we'd receive error messages via e-mail from crontab for better reaction
times when errors do come up.
- Svavar Kjarrval
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: OpenPGP digital signature
More information about the dev