You are not logged in.
Pages: 1
Hello all!
I would like to adjust the format of the date in the error log of Mail Watch. How do I go about that?
Last edited by Wed (2014-10-23 00:19:32)
Offline
Looks like you have to change the source. Specifically in the xfce_mailwatch_log_message function:
void
xfce_mailwatch_log_message(XfceMailwatch *mailwatch,
XfceMailwatchMailbox *mailbox,
XfceMailwatchLogLevel level,
const gchar *fmt,
...)
{
XfceMailwatchLogEntry *entry = NULL;
va_list args;
GList *l;
GTimeVal gt;
g_return_if_fail( mailwatch &&
level < XFCE_MAILWATCH_N_LOG_LEVELS && fmt );
entry = g_new0( XfceMailwatchLogEntry, 1 );
entry->mailwatch = mailwatch;
entry->level = level;
g_get_current_time(>);
entry->timestamp = (time_t)gt.tv_sec;
va_start( args, fmt );
entry->message = g_strdup_vprintf( fmt, args );
va_end( args );
if(mailbox) {
/* locked on, captain */
g_mutex_lock(mailwatch->mailboxes_mx);
for(l = mailwatch->mailboxes; l; l = l->next) {
XfceMailwatchMailboxData *mdata = l->data;
if(mdata->mailbox == mailbox) {
entry->mailbox_name = g_strdup(mdata->mailbox_name);
break;
}
}
/* and we're done, unlock */
g_mutex_unlock(mailwatch->mailboxes_mx);
}
g_idle_add( xfce_mailwatch_signal_log_message, entry );
}
I'm guessing at the:
entry->timestamp = (time_t)gt.tv_sec;
...line.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I hoped that wouldn't be the case. But thanks for the response.
Offline
Pages: 1
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 520.85 KiB (Peak: 521.7 KiB) ]