Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 227 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectup
  68044   Wed Jul 15 21:30:47 2015 Reply Erkcan Ozcanerkcan@gmail.comQuestionLinux3.1.0-5be245eRe: Customized email subject line for an updated entry

Since there were no responses, I decided to make good use of the fact that the software is thankfully open-sourced. I modified elogd.c and added just a couple of lines to get what I wanted.

22245,22250d22244
<    if (old_mail && getcfg(lbs->name, "Use Email Subject Edit", subject, sizeof(subject))) {
<       i = build_subst_list(lbs, slist, svalue, attrib, TRUE);
<       sprintf(str, "%d", message_id);
<       add_subst_list(slist, svalue, "message id", str, &i);
<       strsubst_list(subject, sizeof(subject), slist, svalue, i);
<    } else

 

These lines just follow the comment line: /* compose subject from attributes */

 

Erkcan Ozcan wrote:

Hi,

The default email subject line for a new entry is: "New ELOG entry", and the default email subject line for an edited entry is: "Updated ELOG entry". However when we set "Use Email Subject", both new entries and the updated entries use the same email subject. Is there an equivalent of "Use Email Heading Edit" for the subject line? I tried "Use Email Subject Edit", to no avail.

Thanks in advance,

e.

 

  68066   Tue Aug 4 13:29:45 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux3.1.0-5be245eRe: Customized email subject line for an updated entry

Thanks, I added your code to the distribution and updated the documentation.

Erkcan Ozcan wrote:

Since there were no responses, I decided to make good use of the fact that the software is thankfully open-sourced. I modified elogd.c and added just a couple of lines to get what I wanted.

22245,22250d22244
<    if (old_mail && getcfg(lbs->name, "Use Email Subject Edit", subject, sizeof(subject))) {
<       i = build_subst_list(lbs, slist, svalue, attrib, TRUE);
<       sprintf(str, "%d", message_id);
<       add_subst_list(slist, svalue, "message id", str, &i);
<       strsubst_list(subject, sizeof(subject), slist, svalue, i);
<    } else

 

These lines just follow the comment line: /* compose subject from attributes */

 

Erkcan Ozcan wrote:

Hi,

The default email subject line for a new entry is: "New ELOG entry", and the default email subject line for an edited entry is: "Updated ELOG entry". However when we set "Use Email Subject", both new entries and the updated entries use the same email subject. Is there an equivalent of "Use Email Heading Edit" for the subject line? I tried "Use Email Subject Edit", to no avail.

Thanks in advance,

e.

 

 

  67523   Mon Jun 3 15:53:22 2013 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.9.2Re: Daemonizing vs. shell execution

Martin Rongen wrote:

Hi all

I have setup an logbook that executes a number of shell scripts to preset attributes and append standart information, which works great. Now I am trying to daemonise the whole thing. I have tried the -D option as well as daemontools. In both cases the logbook itself is functional but the bash scripts do not get executed.

Any ideas how I can resolve this problem?

Martin

Usually the problem comes from the fact that a daemon runs from the root directory ('/') by definition. I might not find your scripts if they are not in the path. Try to call them explicitly with the ful path like "/usr/local/elog/script.sh".

/Stefan 

  67527   Tue Jun 4 13:26:02 2013 Reply Martin Rongenmartin.rongen@rwth-aachen.deQuestionLinux2.9.2Re: Daemonizing vs. shell execution

Stefan Ritt wrote:

Martin Rongen wrote:

Hi all

I have setup an logbook that executes a number of shell scripts to preset attributes and append standart information, which works great. Now I am trying to daemonise the whole thing. I have tried the -D option as well as daemontools. In both cases the logbook itself is functional but the bash scripts do not get executed.

Any ideas how I can resolve this problem?

Martin

Usually the problem comes from the fact that a daemon runs from the root directory ('/') by definition. I might not find your scripts if they are not in the path. Try to call them explicitly with the ful path like "/usr/local/elog/script.sh".

/Stefan 

 I didn't know that. Thanks for the quick response. I have it working now :)

  65733   Mon Feb 11 22:24:37 2008 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux | WindowsV2.7.2Re: Data Export:: Date Problem

Richard Ecclestone wrote:

Hi

Im currently experimenting with Elog to see if we can use it to track maintenance work. But Ive come up against a problem, When I export the data to a csv file,

the date has a comma inserted between the day of the week and the rest of the date. This means that all the fields are then shifted to the right after the date.

This looks like a bug to me, the test records included in the demo does not exhibit this problem, until a new record is added.

  What about exporting record separated by a semicolong ";" ?

  65734   Mon Feb 11 22:33:37 2008 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux | WindowsV2.7.2Re: Data Export:: Date Problem

Stefan Ritt wrote:

Richard Ecclestone wrote:

Hi

Im currently experimenting with Elog to see if we can use it to track maintenance work. But Ive come up against a problem, When I export the data to a csv file,

the date has a comma inserted between the day of the week and the rest of the date. This means that all the fields are then shifted to the right after the date.

This looks like a bug to me, the test records included in the demo does not exhibit this problem, until a new record is added.

  What about exporting record separated by a semicolong ";" ?

I fixed that in SVN revision #2040, the comma is simply replaced by a space in the date string.

  65735   Tue Feb 12 08:54:48 2008 Reply Richard Ecclestonerichard.ecclestone@cern.chBug reportLinux | WindowsV2.7.2Re: Data Export:: Date Problem

Stefan Ritt wrote:

Stefan Ritt wrote:

Richard Ecclestone wrote:

Hi

Im currently experimenting with Elog to see if we can use it to track maintenance work. But Ive come up against a problem, When I export the data to a csv file,

the date has a comma inserted between the day of the week and the rest of the date. This means that all the fields are then shifted to the right after the date.

This looks like a bug to me, the test records included in the demo does not exhibit this problem, until a new record is added.

  What about exporting record separated by a semicolong ";" ?

I fixed that in SVN revision #2040, the comma is simply replaced by a space in the date string.

Hi Stefan

Thanks for the quick reply.

We seem to be running 2012 - Which may explain the problem - I will see with our system administrator why we are not running 2040. By the way I also had this problem when running the windows version.

Cheers.. Richard

  65736   Tue Feb 12 10:52:17 2008 Reply Richard Ecclestonerichard.ecclestone@cern.chBug reportLinux | WindowsV2.7.2Re: Data Export:: Date Problem

Richard Ecclestone wrote:

Stefan Ritt wrote:

Stefan Ritt wrote:

Richard Ecclestone wrote:

Hi

Im currently experimenting with Elog to see if we can use it to track maintenance work. But Ive come up against a problem, When I export the data to a csv file,

the date has a comma inserted between the day of the week and the rest of the date. This means that all the fields are then shifted to the right after the date.

This looks like a bug to me, the test records included in the demo does not exhibit this problem, until a new record is added.

  What about exporting record separated by a semicolong ";" ?

I fixed that in SVN revision #2040, the comma is simply replaced by a space in the date string.

Hi Stefan

Thanks for the quick reply.

We seem to be running 2012 - Which may explain the problem - I will see with our system administrator why we are not running 2040. By the way I also had this problem when running the windows version.

Cheers.. Richard

Hi Stefan

Our IT administrator has just downloaded and installed the latest source code from the site and installed it. We still now have version 2012?

Where do we get version 2041 ?

Cheers,  Richard

 

ELOG V3.1.5-2eba886