Re: logging to file in gtkmm



Am 08.06.2012 09:55, schrieb Giuseppe Penone:
> Hi,
> I need to log to file but I'm not an expert in it, I would like to
> control the number of days logged to do not fill up the disk.
> Is there an adviced way to do it in gtkmm?
> Thanks.
> 

There is a logging stream in gtkmm-utils [1]. It doesn't support
truncating the files though. Depending on your application, syslog and
logrotate might be a better approach.

Alternatively, do some timeout logic (using [2]) to change the log file
every day and remove old ones.

[1] http://code.google.com/p/gtkmm-utils/
[2]
http://developer.gnome.org/glibmm/unstable/classGlib_1_1SignalTimeout.html

Regards,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]