Re: logging to file in gtkmm
- From: Giuseppe Penone <giuspen gmail com>
- To: Florian Philipp <lists binarywings net>
- Cc: gtkmm-list gnome org
- Subject: Re: logging to file in gtkmm
- Date: Mon, 11 Jun 2012 14:54:49 +0200
I'm sorry to bother again, I'm going with syslog which works pretty good but seems to write
to
/var/log/syslog only and I cannot find a way to write to a dedicated file.
I'm using the following code:
// gcc giuspexample.c -o giuspexample#include <syslog.h>
int main(){ setlogmask(LOG_UPTO (LOG_NOTICE));
openlog("atm", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL0);
syslog(LOG_NOTICE, "Program started by User %d", getuid ());
syslog(LOG_INFO, "A tree falls in a forest"); closelog();
return 0;}I followed the instructions on
http://www.codealias.info/technotes/syslog_simple_example on how to change the destination filepath
echo "local0.* /var/log/mylog" >> /etc/syslog.confbut does not write on
/var/log/mylog (still on
/var/log/syslog).
I'm on (L)ubuntu 12.04.
Many thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]