Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   elog client overwriting attached files when editing existing log, posted by Joseph McKenna on Wed Sep 16 02:47:33 2015 
    icon2.gif   Re: elog client overwriting attached files when editing existing log, posted by Edmund Hertle on Mon Sep 21 10:48:31 2015 
       icon2.gif   Re: elog client overwriting attached files when editing existing log, posted by Andreas Luedeke on Mon Sep 28 06:45:03 2015 
          icon2.gif   Re: elog client overwriting attached files when editing existing log, posted by Stefan Ritt on Mon Sep 28 11:58:11 2015 
          icon2.gif   Re: elog client overwriting attached files when editing existing log, posted by Edmund Hertle on Wed Sep 30 10:23:30 2015 
Message ID: 68130     Entry time: Mon Sep 28 06:45:03 2015     In reply to: 68118     Reply to this: 68131   68136
Icon: Reply  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Request  OS: All  ELOG Version: 2.9.0(elogd) 
Subject: Re: elog client overwriting attached files when editing existing log 

The "elog" command has no "append" feature. You can either create a new entry, or you can overwrite an old entry. Therefore this is not a bug but the intended bahaviour.

I admit that the documentation is misleading, since overwriting an existing entry is called "editing":

[-e <id>]                Edit existing message

I interprete your posts that you would like to have two new features for the "elog" command:

  • to append text to the body of an existing entry
  • to add additional attachments to an existing entry

Without a specific application in mind I would like to add a request (for consistency):

  • to modify a specific attribute of an existing entry.

Cheers, Andreas

Edmund Hertle wrote:

Hey,

I think this is a "problem" of the elog client, since it simply replaces the data. In most cases this is what you want, but since I wanted to have the option to append to the acutal message I built a function to first read-back the entry and add to the message instead of replacing it.

I just played around a bit and found that the attachments will be even disconnected, if you do not specify the -f parameter but just edit a different part of this entry.

A work-around for this is tricky. I tried to write to the "Attachment" attribute directly (-a "Attachment=Filename'), since then you coud read back the data first and manually add the filenames again. But this does not work.

Since the attachments are not actually removed, the only option I see is to modify the logbook file entry on the server by manually re-adding the filenames to the "Attachment: " line.

Joseph McKenna wrote:

Using the elog client to upload atachments, I can successfully send attachments to an existing elog, however the existing attachments are lost.

I have tested using the elog client version 3.1.1 and elog client version 2.9.2 sending to elogd 2.9.0

elog -h localhost -p 8080 -l test -f  file1.png -f file2.png -e 249 -v -x

This works great, the text contained in the elog post is retained, however all attachments are lost and replaced with those sent by this command.

Can anyone provide some tips? I am not sure if its a problem with the client or server.

Thank you in advance!

Joseph


            

 

 

ELOG V3.1.5-fe60aaf