Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 727 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  67477   Tue Apr 23 22:14:42 2013 Question Matthew D.364603@swan.ac.ukQuestionLinux2.9.2Exim4

 Hi,

My email configuration is a little complicated as all emails must be relayed to a central server with TLS authentication. 

So far I've been unable to get the ELOG to work with email, after numerous attempts .  I have got exim4 working on this machine but I don't understand how the elog sends emails well enough, to configure it to recognise and use exim4.  Setting localhost/ my domain/ IP  (and variations) under 'smtp host' doesn't work. (cannot connect to server)

The most interesting error I have been able to get is:

"AUTH command used when not advertised"

or

"Unrecognized authentication type"

Any advice?

 

  69064   Sun Nov 24 20:29:24 2019 Question Frank Baptistacaffeinejazz@gmail.comRequestMac OSX3.1.3-fd7f1e2Executing a shell command using elogd Windows service

Greetings!

We've been successfully running nearly a dozen separate logbooks on independent laptops -- all of them are running elogd as a Windows service. This works well, since I've also set up auto recovery options in the event that the service inadvertently stops.

Now, I have a need to place the value of an attribute of the latest log entry into a basic text file.  Of course, this works just fine if I have launched elogd -x as a normal executable, using
Execute new = echo $Status > Last_status.log in my CFG file.  However, I would like to be able to do this using the Windows service which is running in the background. 

Is there another way to write the value of an attribute into a separate file?  If not, do I have to have a special build of ELOG in order to be able to enable the Windows service to execute shell commands?  For the record, these logbooks are running on secure laptops that are isolated onto their own network, and the user is unable to edit the CFG file.

In case you're wondering about the reason for the separate text file -- I've written a separate program which illuminates one of 4 different color signal lamps (mounted on a test station), based on the latest "Status" of the test station. (Running, Idle, Broken, Other).

I appreciate any guidance here -- this is a "big deal" here, as one glance over the floor gives us an idea of what's running (or not).

Thanks!
Frank

Attachment 1: Signal_tower.jpg
Signal_tower.jpg
  68270   Fri Feb 26 17:35:54 2016 Entry Juergen Diefenbachdiefenba@uni-mainz.deBug reportLinux3.1.1Execute new|edit doesn't seem to work
I am trying to use the "Execute new|edit|delete" feature to track changes to an elog using git.

When a new entry is created a shell script should be executed (certain attributes of the logbook entry should be passed as arguments to it). The script will then automatically stage all changes and create an appropriate git commit message. For a "new" entry in the logbook the commit message is a bit more verbose. When editing or deleting a message only a short commit message like "Edit message 25" should be created. Therefore I really need to distinguish between "new", "edit", and "delete".

However, I experienced unreproducible behavior when creating "new" entries. Sometimes the command specified by "Execute new=" is called, sometimes the one specified by "Execute edit=" is executed. Most of the time it doesn't work as expected. Frown

What I did so far to understand what goes wrong is I looked into elogd.c and found in
void submit_elog(LOGBOOK * lbs)
that bedit is sometimes true and sometimes false, when creating a new entry, although it should be false then (right?).
This is why elogd then sometimes retrieves the wrong shell command from getcfg(lbs->name, "Execute edit"...) instead of getcfg(lbs->name, "Execute new"...) around line 23610 (not exact due to some eprintf()s inserted here and there to look at bedit and so on).

When deleting an entry, everything works fine: the shell command defined via "Execute delete=" is run, but this happens somewhere else in the code so it's not a surprise.

Do you have an idea how to fix this or can you point me in some direction to further track it down? Thank you!
  68967   Fri May 10 04:34:36 2019 Question Alan Grantagrant@winnipeg.caQuestionWindows3.1.2Execute attribute

Apart from an inline shell command that can be run with the Execute attribute, is it possible to run an external script file? I would like to run a Powershell script with the Elog attribute data parameters passed to it upon Submit New entry.

  66926   Tue Nov 9 19:28:53 2010 Question harleyh9s@ornl.govQuestionMac OSX2.7.8Execute a python command?

Is there a way to add a button to the elog interface which would execute a python command?

  69060   Mon Nov 18 16:58:21 2019 Idea Roger Kaltroger.kalt@psi.chInfoLinux3.1.4Example scripts how to migrate or combine logbooks

Attached the shell scripts using awk and sed how I have migrated two separated logbooks into one single and how I re-adjusted certain attributes.

Attachment 1: run_modif.sh
#!/bin/bash
# KR84, 28.10.2019

# the input files are the exported XML files from ELOG -> Finden


# search in XML for sring between <DATE> and </DATE>
# and replace with: <DATE> and </DATE><When> and </When>
echo "converting export_rf.xml ..."
cat ./export_rf.xml | 
    sed 's/<Personnel\(.*\)Personnel>/<Author\1Author>/g' |
    sed 's/<DATE\(.*\)DATE>/<DATE\1DATE>\n\t\t<When\1When>/g'   |
    sed 's/<Subject>\(.*\)<\/Subject>/<Title>\1<\/Title><Entry_Type><\/Entry_Type>/g' |
    sed '/<Machine>SwissFEL<\/Machine>/ {N;N; s/<Machine>SwissFEL<\/Machine>.*<Domain>OBLA<\/Domain>.*<Section>TRFCB/<Machine>OBLA<\/Machine>\n\t\t<Domain>All<\/Domain>\n\t\t<Section>TRFCB/g}'  |
    sed 's/<When>Mon, /<When>/g'                          |
    sed 's/<When>Tue, /<When>/g'                          |
    sed 's/<When>Wed, /<When>/g'                          |
    sed 's/<When>Thu, /<When>/g'                          |
    sed 's/<When>Fri, /<When>/g'                          |
    sed 's/<When>Sat, /<When>/g'                          |
    sed 's/<When>Sun, /<When>/g'                          |
    sed '/<When>.*<\/When>/{s/ Jan 20/.01./g}'                    |
    sed '/<When>.*<\/When>/{s/ Feb 20/.02./g}'                    |
    sed '/<When>.*<\/When>/{s/ Mar 20/.03./g}'                    |
    sed '/<When>.*<\/When>/{s/ Apr 20/.04./g}'                    |
    sed '/<When>.*<\/When>/{s/ May 20/.05./g}'                    |
    sed '/<When>.*<\/When>/{s/ Jun 20/.06./g}'                    |
    sed '/<When>.*<\/When>/{s/ Jul 20/.07./g}'                    |
    sed '/<When>.*<\/When>/{s/ Aug 20/.08./g}'                    |
    sed '/<When>.*<\/When>/{s/ Sep 20/.09./g}'                    |
    sed '/<When>.*<\/When>/{s/ Oct 20/.10./g}'                    |
    sed '/<When>.*<\/When>/{s/ Nov 20/.11./g}'                    |
    sed '/<When>.*<\/When>/{s/ Dec 20/.12./g}'                    |
    sed 's/ +0100<\/When>/<\/When>/g'                                     |
    sed 's/ +0200<\/When>/<\/When>/g'                                     > export_rf_modified.xml



#    sed 's/ Jan 20/.01./g'                              |
#    sed 's/ Feb 20/.02./g'                              |
#    sed 's/ Mar 20/.03./g'                              |
#    sed 's/ Apr 20/.04./g'                              |
#    sed 's/ May 20/.05./g'                              |
#    sed 's/ Jun 20/.06./g'                              |
#    sed 's/ Jul 20/.07./g'                              |
#    sed 's/ Aug 20/.08./g'                              |
#    sed 's/ Sep 20/.09./g'                              |
#    sed 's/ Oct 20/.10./g'                              |
#    sed 's/ Nov 20/.11./g'                              |
#    sed 's/ Dec 20/.12./g'                              |




# search in XML and add offset to all IDs because they shall not overlap when merged.
echo "converting export_llrf.xml ..."
cat ./export_llrf.xml           | sed 's/<Subject>\(.*\)<\/Subject>/<Entry_Type><\/Entry_Type>\n\t\t<Status><\/Status>\n\t\t<Title>\1<\/Title>\n\t\t<Inv_ID><\/Inv_ID>/g' > export_llrf_modified1.xml
cat ./export_llrf_modified1.xml | awk -F'\t\t<MID>|</MID>||' '{ if ($2!="") {print "\t\t<MID>"$2+2016"</MID>"} else { print $1} }' > export_llrf_modified2.xml
cat ./export_llrf_modified2.xml | awk -F'\t\t<REPLY_TO>|</REPLY_TO>||' '{ if ($2!="") {print "\t\t<REPLY_TO>"$2+2016"</REPLY_TO>"} else { print $1} }' > export_llrf_modified3.xml
cat ./export_llrf_modified3.xml | awk -F'\t\t<IN_REPLY_TO>|</IN_REPLY_TO>||' '{ if ($2!="") {print "\t\t<IN_REPLY_TO>"$2+2016"</IN_REPLY_TO>"} else { print $1} }' > export_llrf_modified.xml

rm -rf ./export_llrf_modified1.xml ./export_llrf_modified2.xml ./export_llrf_modified3.xml 

cat ./export_llrf_modified.xml | 
    sed '/<Machine>SwissFEL<\/Machine>/ {N;N; s/<Machine>SwissFEL<\/Machine>.*<Domain>Test Systems<\/Domain>.*<Section>TRFCB/<Machine>OBLA<\/Machine>\n\t\t<Domain>All<\/Domain>\n\t\t<Section>TRFCB/g}'  |
    sed 's/<When>Mon /<When>/g'                           |
    sed 's/<When>Tue /<When>/g'                           |
    sed 's/<When>Wed /<When>/g'                           |
    sed 's/<When>Thu /<When>/g'                           |
    sed 's/<When>Fri /<When>/g'                           |
    sed 's/<When>Sat /<When>/g'                           |
    sed 's/<When>Sun /<When>/g'                           |
    sed 's/-Jan-/.01./g'                              |
    sed 's/-Feb-/.02./g'                              |
    sed 's/-Mar-/.03./g'                              |
    sed 's/-Apr-/.04./g'                              |
    sed 's/-May-/.05./g'                              |
    sed 's/-Jun-/.06./g'                              |
    sed 's/-Jul-/.07./g'                              |
    sed 's/-Aug-/.08./g'                              |
    sed 's/-Sep-/.09./g'                              |
    sed 's/-Oct-/.10./g'                              |
    sed 's/-Nov-/.11./g'                              |
    sed 's/-Dec-/.12./g'                              |
    sed 's/ +0100<\/When>//g'                                     |
    sed 's/ +0200<\/When>//g'                                     |
    sed 's/<\/When>/:00<\/When>/g'                      |
    sed 's/<When>-:00<\/When>/<When><\/When>/g'                    > export_llrf_modified_datetime.xml

echo "export_llrf_modified_datetime.xml need manual edit for empty <When></When>"
Attachment 2: generate_import_llrf_fwd.sh
#!/bin/bash
# KR84, 28.10.2019

# generate emtpy auto-fwd text for LLRF for 3100 entries and offset of 2000
echo "generated import_llrf_fwd.xml"
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > import_llrf_fwd.xml
echo "<ELOG_LIST>" >> import_llrf_fwd.xml

declare -i ID
declare -i IDNEW

for ID in {1..3013}
do
    IDNEW=$ID+2016

    echo -e "\t<ENTRY>" >> import_llrf_fwd.xml
    echo -e "\t\t<MID>${ID}</MID>" >> import_llrf_fwd.xml
    echo -e "\t\t<DATE>Mon, 28 Oct 2019 20:00:00 +0200</DATE>" >> import_llrf_fwd.xml
#    echo -e "\t\t<DATE>28.10.2019 20:00:00</DATE>" >> import_llrf_fwd.xml
    echo -e "\t\t<ATTACHMENT></ATTACHMENT>" >> import_llrf_fwd.xml
    echo -e "\t\t<ENCODING>HTML</ENCODING>" >> import_llrf_fwd.xml
    echo -e "\t\t<When>28.10.2019 20:00:00</When>" >> import_llrf_fwd.xml
#    echo -e "\t\t<When>1572289200</When>" >> import_llrf_fwd.xml
    echo -e "\t\t<Author>Kalt Roger (KR84)</Author>" >> import_llrf_fwd.xml
    echo -e "\t\t<Machine>SwissFEL</Machine>" >> import_llrf_fwd.xml
    echo -e "\t\t<Domain></Domain>" >> import_llrf_fwd.xml
    echo -e "\t\t<Section></Section>" >> import_llrf_fwd.xml
    echo -e "\t\t<System></System>" >> import_llrf_fwd.xml
    echo -e "\t\t<Subsystem></Subsystem>" >> import_llrf_fwd.xml
    echo -e "\t\t<Subject>Automatic forward</Subject>" >> import_llrf_fwd.xml
    echo -e "\t\t<TEXT>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0; URL=&apos;https://elog-gfa.psi.ch/SwissFEL+RF/${IDNEW}&apos;&quot; /&gt;</TEXT>" >> import_llrf_fwd.xml
    echo -e "\t</ENTRY>" >> import_llrf_fwd.xml
done

echo "</ELOG_LIST>" >> import_llrf_fwd.xml

  66258   Fri Mar 20 14:33:53 2009 Question Gernot BuselmeierGernot.Buselmeier@gefanuc.comQuestionAll2.7.3Escape emoticons in ELCODE

Hi,

I want to write a text like "John:Doe" in ELCODE. However the ":D" is converted to a LOL emoticon. I tried various ways to escape this. One solution I found was entering "John\:Doe". However, the upper-case D is converted to lower-case: the result reads "John:doe".

 

Thanks for an answer and many thanks for providing ELOG.

Gernot

  68359   Fri Jul 15 19:46:26 2016 Entry Donjang.dongwook@gmail.comBug reportAllELOG V3.1.0-241Escape character [ or ] doesn't work within [url]

Here is the problem:

[url=http://example.com?arrays[]=v1&arrays[]=v2]click here[/url]

How can I escape [] inside url tag?

\[\] seems not working.

ELOG V3.1.5-fe60aaf