Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 206 of 801  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  68130   Mon Sep 28 06:45:03 2015 Reply Andreas Luedekeandreas.luedeke@psi.chRequestAll2.9.0(elogd)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


            

 

 

  68131   Mon Sep 28 11:58:11 2015 Reply Stefan Rittstefan.ritt@psi.chRequestAll2.9.0(elogd)Re: elog client overwriting attached files when editing existing log

You are right. "Edit" should be more like "Replace". I changed that in the documentation.

I acknowledge the request to replace or append only a specific attribute or attachment, and put it on my to-do list.

Stefan

Andreas Luedeke wrote:

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


            

 

 

 

  68136   Wed Sep 30 10:23:30 2015 Reply Edmund Hertleedmund.hertle@kit.eduRequestAll2.9.0(elogd)Re: elog client overwriting attached files when editing existing log

Hey,

the edit/replace feature is already capable of just replacing individual attributes. I already make heavy use of this feature:

1. One entry is created with some measurement parameters

2. A different script is running processing the measurement data making a plot and a fit

3. Two fit parameters and the attachment are added to the original elog entry (all other attributes and values still exist afterwards)

But the problem here is, that although it does work for normal attrbutes, the attachments will always be replaced (=> removed) if you use this command. Since I only add the attachment on the edit it does work for me. 

Btw the documentation on the homepage is also misleading about the -w command, since in the actual version it does nothing with any password but just reads back the whole elog entry (which I use to manually append the main message)

 

 

Andreas Luedeke wrote:

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


            

 

 

 

  68386   Fri Aug 19 22:43:21 2016 Reply Rudy Taraschirudy.taraschi@L-3com.comQuestionWindowsV3.1.1-3f311c5Re: elog client cmd line submission of attributes with spaces.
Try commenting out the Required Attributes line in your elogd.cfg file before submitting. I think it's a bug but this work-around gets around it.
  68387   Sat Aug 20 12:17:10 2016 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindowsV3.1.1-3f311c5Re: elog client cmd line submission of attributes with spaces.
If the "Start Time" attribute is of the type "datetime", then you cannot assign a date string to it.
Instead you'll have to assign the seconds of the epoch.
Try assigning a "0", that should be the 1st of January 1970.

I hope that helps,
Andreas

Darren Hollinrake wrote:
I was setting of a local test copy of my logbooks on my Windows 7 PC to begin testing automation of submissions without spamming the live logbooks. While trying to make entries from the command line I get an error that I am missing a required attribute. I have multiple attributes that have spaces in them an the verbose output indicates that the space in the name is being changed to an underscore. Is this the expected behavior or a bug when submitting to the elog client in Windows?

Command being entered:

Quote:
C:\Program Files (x86)\ELOG>elog -h 127.0.0.1 -p 443 -s -l "Oceana Logbook" -u j
ohn.smith john.smith -v -n 0 -a Platform=LSOT -a "Start Time"="Fri, 19 Aug 2016
12:58:01 -0500" -a "Author=John Smith" -a "Device=2H111-1" -a "Action Type"=Mai
ntenance -a "Maint Type"=Unscheduled -a "System=Device" -a "Downtime=No" -a "Man
Hours"=1.0 -a MAF="" -a "Lost Time"="" -m "testing"

You can see where I have multiple attributes with spaces. Below you see where the name shows an underscore instead of a space.


Quote:
Successfully connected to host 127.0.0.1, port 443
Request sent to host:
POST /Oceana+Logbook/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------22C602B76
C41
Host: 127.0.0.1:443
User-Agent: ELOG
Content-Length: 1790


Content sent to host:
---------------------------22C602B76C41
Content-Disposition: form-data; name="cmd"

Submit
---------------------------22C602B76C41
Content-Disposition: form-data; name="unm"

john.smith
---------------------------22C602B76C41
Content-Disposition: form-data; name="upwd"

JUl77l/.kXYBzfoOZpsy.URRZEZpg2SHZNZIum6Rh/5
---------------------------22C602B76C41
Content-Disposition: form-data; name="exp"

Oceana Logbook
---------------------------22C602B76C41
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------22C602B76C41
Content-Disposition: form-data; name="Platform"

LSOT
---------------------------22C602B76C41
Content-Disposition: form-data; name="Start_Time"

Fri, 19 Aug 2016 12:58:01 -0500
---------------------------22C602B76C41
Content-Disposition: form-data; name="Author"

Bruce Slack
---------------------------22C602B76C41
Content-Disposition: form-data; name="Device"

2H111-1
---------------------------22C602B76C41
Content-Disposition: form-data; name="Action_Type"

Maintenance
---------------------------22C602B76C41
Content-Disposition: form-data; name="Maint_Type"

Unscheduled
---------------------------22C602B76C41
Content-Disposition: form-data; name="System"

Device
---------------------------22C602B76C41
Content-Disposition: form-data; name="Downtime"

No
---------------------------22C602B76C41
Content-Disposition: form-data; name="Man_Hours"

1.0
---------------------------22C602B76C41
Content-Disposition: form-data; name="MAF"


---------------------------22C602B76C41
Content-Disposition: form-data; name="Lost_Time"


---------------------------22C602B76C41
Content-Disposition: form-data; name="Text"

testing 123
---------------------------22C602B76C41

Response received:
HTTP/1.1 404 Not Found
Server: ELOG HTTP 3.1.1-3f311c5
Content-Type: text/html;charset=ISO-8859-1
Connection: Close

<!DOCTYPE html>
<html><head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<title>ELOG error</title>
<link rel="stylesheet" type="text/css" href="elog.css">
</head>
<body><center>
<table class="dlgframe" width="50%" cellpadding="1" cellspacing="0"<tr><td class
="errormsg"><i>Error: Attribute <b>Start Time</b> not supplied.</i><p>
Please go back and enter the <b>Start Time</b> field.
</td></tr>
<tr><td class="errormsg"><script language="javascript" type="text/javascript">
document.write("<button type=button onClick=history.back()>Back</button>");
</script>
<noscript>
Please use your browser's back button to go back
</noscript>
</td></tr>
</table>
</center></body></html>

Error: Missing required attribute "Start Time"

  68404   Thu Aug 25 18:18:57 2016 Reply Darren Hollinrakehollinrakedp@gmail.comQuestionWindowsV3.1.1-3f311c5Re: elog client cmd line submission of attributes with spaces.
Thanks for the reply. You're correct that the "Start Time" attribute is a datetime field. I tried your suggestion and placed "0" for that field but it still returns the same error: Error: Missing required attribute "Start Time"
I tested after commenting out the required attribute line and the command was accepted. However, the datetime field does not display a valid date/time just a dash "-". It was a dash with both the "0" set and my previous format as well.

I did a bit more troubleshooting and if I removed the "Start Time" attribute from the list of required attributes, then my command would also be accepted. It was only choking on the datetime field as it appears I'm supplying it an invalid value. I just gave it a current epoch time and it functioned normally when a datetime attribute is not required. If I require my "Start Time" attribute and give it a valid epoch time (1472144295), it again throws the error that I'm missing a required attribute.


Andreas Luedeke wrote:
If the "Start Time" attribute is of the type "datetime", then you cannot assign a date string to it.
Instead you'll have to assign the seconds of the epoch.
Try assigning a "0", that should be the 1st of January 1970.

I hope that helps,
Andreas

Darren Hollinrake wrote:
I was setting of a local test copy of my logbooks on my Windows 7 PC to begin testing automation of submissions without spamming the live logbooks. While trying to make entries from the command line I get an error that I am missing a required attribute. I have multiple attributes that have spaces in them an the verbose output indicates that the space in the name is being changed to an underscore. Is this the expected behavior or a bug when submitting to the elog client in Windows?

Command being entered:

Quote:
C:\Program Files (x86)\ELOG>elog -h 127.0.0.1 -p 443 -s -l "Oceana Logbook" -u j
ohn.smith john.smith -v -n 0 -a Platform=LSOT -a "Start Time"="Fri, 19 Aug 2016
12:58:01 -0500" -a "Author=John Smith" -a "Device=2H111-1" -a "Action Type"=Mai
ntenance -a "Maint Type"=Unscheduled -a "System=Device" -a "Downtime=No" -a "Man
Hours"=1.0 -a MAF="" -a "Lost Time"="" -m "testing"

You can see where I have multiple attributes with spaces. Below you see where the name shows an underscore instead of a space.


Quote:
Successfully connected to host 127.0.0.1, port 443
Request sent to host:
POST /Oceana+Logbook/ HTTP/1.0
Content-Type: multipart/form-data; boundary=---------------------------22C602B76
C41
Host: 127.0.0.1:443
User-Agent: ELOG
Content-Length: 1790


Content sent to host:
---------------------------22C602B76C41
Content-Disposition: form-data; name="cmd"

Submit
---------------------------22C602B76C41
Content-Disposition: form-data; name="unm"

john.smith
---------------------------22C602B76C41
Content-Disposition: form-data; name="upwd"

JUl77l/.kXYBzfoOZpsy.URRZEZpg2SHZNZIum6Rh/5
---------------------------22C602B76C41
Content-Disposition: form-data; name="exp"

Oceana Logbook
---------------------------22C602B76C41
Content-Disposition: form-data; name="encoding"

ELCode
---------------------------22C602B76C41
Content-Disposition: form-data; name="Platform"

LSOT
---------------------------22C602B76C41
Content-Disposition: form-data; name="Start_Time"

Fri, 19 Aug 2016 12:58:01 -0500
---------------------------22C602B76C41
Content-Disposition: form-data; name="Author"

Bruce Slack
---------------------------22C602B76C41
Content-Disposition: form-data; name="Device"

2H111-1
---------------------------22C602B76C41
Content-Disposition: form-data; name="Action_Type"

Maintenance
---------------------------22C602B76C41
Content-Disposition: form-data; name="Maint_Type"

Unscheduled
---------------------------22C602B76C41
Content-Disposition: form-data; name="System"

Device
---------------------------22C602B76C41
Content-Disposition: form-data; name="Downtime"

No
---------------------------22C602B76C41
Content-Disposition: form-data; name="Man_Hours"

1.0
---------------------------22C602B76C41
Content-Disposition: form-data; name="MAF"


---------------------------22C602B76C41
Content-Disposition: form-data; name="Lost_Time"


---------------------------22C602B76C41
Content-Disposition: form-data; name="Text"

testing 123
---------------------------22C602B76C41

Response received:
HTTP/1.1 404 Not Found
Server: ELOG HTTP 3.1.1-3f311c5
Content-Type: text/html;charset=ISO-8859-1
Connection: Close

<!DOCTYPE html>
<html><head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<title>ELOG error</title>
<link rel="stylesheet" type="text/css" href="elog.css">
</head>
<body><center>
<table class="dlgframe" width="50%" cellpadding="1" cellspacing="0"<tr><td class
="errormsg"><i>Error: Attribute <b>Start Time</b> not supplied.</i><p>
Please go back and enter the <b>Start Time</b> field.
</td></tr>
<tr><td class="errormsg"><script language="javascript" type="text/javascript">
document.write("<button type=button onClick=history.back()>Back</button>");
</script>
<noscript>
Please use your browser's back button to go back
</noscript>
</td></tr>
</table>
</center></body></html>

Error: Missing required attribute "Start Time"

  68405   Thu Aug 25 18:32:13 2016 Agree Darren Hollinrakehollinrakedp@gmail.comQuestionWindowsV3.1.1-3f311c5Re: elog client cmd line submission of attributes with spaces.
Thanks for the response. You are indeed correct that the issue disappears when I comment out my required attributes line. If I just remove my "Start Time" attribute, all the other attributes work as well.


Rudy Taraschi wrote:
Try commenting out the Required Attributes line in your elogd.cfg file before submitting. I think it's a bug but this work-around gets around it.
  68406   Thu Aug 25 18:45:48 2016 Reply Rudy Taraschirudy.taraschi@L-3com.comQuestionWindowsV3.1.1-3f311c5Re: elog client cmd line submission of attributes with spaces.

Darren Hollinrake wrote:
Thanks for the response. You are indeed correct that the issue disappears when I comment out my required attributes line. If I just remove my "Start Time" attribute, all the other attributes work as well.

I used to just comment out that one field in Required Attributes as well, but it was a pain to edit the CFG file, so I took the lazy approach and just commented out the whole line - less typing Wink
ELOG V3.1.5-3fb85fa6