using syslog instead of console for messages

Riccardo Magliocchetti riccardo.magliocchetti at gmail.com
Mon Aug 27 11:04:52 PDT 2012


Hello,

Il 27/08/2012 09:41, Riccardo Magliocchetti ha scritto:
> Hello Stephan,
>
> Il 27/08/2012 09:13, Stephan Bergmann ha scritto:
>> On 08/26/2012 12:34 PM, Riccardo Magliocchetti wrote:
>>> while in headless mode i'd like to have messages delivered to syslog
>>> instead of stderr / stdout, looking at the SAL_* implementation it looks
>>> like what i want is to substitute the std::fputs in
>>> osl/all/log.cxx::log() with syslog() plus some map between these levels
>>> and syslog ones. Is that ok?
>>
>> yes

So here's a quick patch, not even compile tested because i have few 
questions to resolve before considering it ready for review:

- what about errors? it looks like SAL does not have a level for errors. 
I'd like to have the errors in vcl/headless/headlessinst.cxx going to 
syslog too. Should i use straight syslog or can i use another facility?

- is it ok to initialize syslog in desktop/source/app/sofficemain.cxx?

- can you suggests something better than WANT_SYSLOG_LOGS ? :)

- should i add a switch for syslog logging to configure so that the 
feature may be used also in other environments? May be useful for large 
deployments i think where you want centralized logs.

thanks in advance,
riccardo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-syslog-for-headless-errors.diff
Type: text/x-diff
Size: 3707 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120827/a5fee4f0/attachment.diff>


More information about the LibreOffice mailing list