Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Subst variables and Execute, posted by soren poulsen on Wed Jul 21 16:26:17 2010 
    icon2.gif   Re: Subst variables and Execute, posted by Stefan Ritt on Wed Jul 21 16:38:05 2010 
       icon2.gif   Re: Subst variables and Execute, posted by soren poulsen on Thu Jul 22 10:17:29 2010 
          icon2.gif   Re: Subst variables and Execute, posted by soren poulsen on Mon Jul 26 11:41:44 2010 
             icon2.gif   Re: Subst variables and Execute, posted by Stefan Ritt on Wed Jul 28 17:08:55 2010 
                icon2.gif   Re: Subst variables and Execute, posted by soren poulsen on Thu Jul 29 13:45:47 2010 
Message ID: 66858     Entry time: Mon Jul 26 11:41:44 2010     In reply to: 66855     Reply to this: 66865
Icon: Reply  Author: soren poulsen  Author Email: soren.poulsen@cern.ch 
Category: Question  OS: Linux  ELOG Version: 2.7.8 
Subject: Re: Subst variables and Execute 

soren poulsen wrote:

Stefan Ritt wrote:

soren poulsen wrote:

Hi

 

I am trying to use this line from the documentation:

Execute new = echo "New message wiht ID $message id of type $type from $long_name on $remote_host" >> /tmp/elog.log

It does not seem to have the intended effect (of printing a line with the message id, etc in the file /tmp/elog.log
)

How can I make this line work ?

Soren

Have you started the server with the "-x" flag as written in the documentation? 

 Thanks a lot for replying despite the heat. Yes, I executed with the "-x" flag.

It is just a quoting problem, I guess. This line works:

Execute new = echo New message with ID $message id of type $type from $long_name on $remote_host >> /tmp/elog.log

It evaluates to:

SHELL "echo New message with ID 24706 of type elogtype from Soren Poulsen on 137.138.22.11 >> /tmp/elog.log"
 

So next step is to replace "new" with "edit" and "delete".

That works as well.

Soren

 

 

There is sometimes a problem with substitutions like "Execute delete = echo $message id".

It seems the problem is that if you delete a logbook entry that is not created with the current logbook attributes, the substitution variables are replaced with the variable name, and not the variable value.

In this example, according to the log file it becomes SHELL "message id" instead of SHELL "234", if the logbook entry is 234.

Soren

ELOG V3.1.5-fe60aaf