Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 224 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectup
  69256   Tue Oct 27 17:45:29 2020 Reply David Walliswallis@aps.anl.govQuestionLinuxV3.1.4-ba84827Re: Create entry from command line - override Date?

Hi Andreas,

Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.

Andreas Luedeke wrote:

You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.

If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.

Cheers, Andreas

David Wallis wrote:

Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?

Stefan Ritt wrote:

You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:

MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category: 
Subject: CURL test
Attachment: 
Encoding: plain
========================================
Text body
 

 

 

 

  69257   Tue Oct 27 21:59:03 2020 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinuxV3.1.4-ba84827Re: Create entry from command line - override Date?

Hi David,
correct. And in addition you will need to convert "Orig Date" from seconds-of-the-epoch into a properly formated date string (see example below from Stefan) ...

Andreas

David Wallis wrote:

Hi Andreas,

Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.

Andreas Luedeke wrote:

You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.

If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.

Cheers, Andreas

David Wallis wrote:

Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?

Stefan Ritt wrote:

You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:

MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category: 
Subject: CURL test
Attachment: 
Encoding: plain
========================================
Text body
 

 

 

 

 

  69258   Tue Oct 27 22:24:18 2020 Reply David Walliswallis@aps.anl.govQuestionLinuxV3.1.4-ba84827Re: Create entry from command line - override Date?

Hi Andreas,

It was actually easier than that. The time stamps in the old system were in epoch format, so when I created the new record, (my conversion program was written in Python), I simply formatted that value in the format Stefan pointed out below, and defined the Orig Date field as text. Then I was able to munge the logbook file with 2 global editor commands, and it worked perfectly. Thanks again!

Andreas Luedeke wrote:

Hi David,
correct. And in addition you will need to convert "Orig Date" from seconds-of-the-epoch into a properly formated date string (see example below from Stefan) ...

Andreas

David Wallis wrote:

Hi Andreas,

Thanks for your input! After a little testing, it appears that if I make "Orig Date" the first field, it will fall under the Date field in the logbook file. I can then do a global delete of Date:, and replace Orig Date: with Date:, leaving it as the first field in the entry. Then I can delete the Orig Date field.

Andreas Luedeke wrote:

You could transform your entries into the ELOG file format (either XML or CSV) and then use the import function. That would upload the correct dates from your entries.

If you use the "Orig Date" trick you've proposed, you'll see that datetime fields are stored as seconds of the epoch (since 1.1.1970). Not so easy to copy and paste them, but you can convert them with a script.

Cheers, Andreas

David Wallis wrote:

Hi Stefan, thanks! Does the Date field need to be the first field in each entry? I can see adding a "termpory" field called "Orig Date", upload the old entries, then edit the file(s), delete the Date field, and rename Orig Date to Date. Will that work?

Stefan Ritt wrote:

You have to manually manipulate the logbook files YYMMDDa.log where you find the date at the top like:

MID@$: 1
Date: Wed, 02 Sep 2020 15:38:09 +0300 <==== change here !!!!
Author: Stefan
Type: General
Category: 
Subject: CURL test
Attachment: 
Encoding: plain
========================================
Text body
 

 

 

 

 

 

  68773   Tue Apr 3 09:39:07 2018 Reply David PilgramDavid.Pilgram@epost.org.ukQuestionWindows3.1.2Re: Create past Elog entry.

Hi Michael,

Elog purists, look away now.

There is an "official" way to do this, which is to have fields for entry date (so can be in the past), but the yymmdda.log file will be of the date and time you make the entry.  This is in the offical documentation.

If you are not bothered by the ID number being out of sequence (and elog does not really mind, although it occasionally throws a hissy fit/throws its toys out of the pram, which a restart sorts out), but you are one who wants the date of the entry in the log file to also be in the past, skipping the entry date fields issue, it's perfectly do-able.  So long as you can access the yymmdda.log files.

What I, and some others, do is to create a new entry now (for ease, the first entry of the day, but that's not critical), then go to the log files, and with an editor open today's file, find the entry, and edit the day, date and if necessary time; I always set the time as post 22:00, as code for an edited late entry.  I also then cut-and-paste the entry into the log file for the day it should have been entered in (creating it if necessary, in linux make sure the permissions are correct, specifically the user).

If you have attachments, and want those also to reflect the date, you'll need to edit the Attachments section of the elog entry headers (format is obvious), and also rename the attachment files in the directory.

I've not tried an ID number being other than an integer, I guess it would not work.  ID numbers not being in sequence with the date doesn't seem to matter.  Messing with ID numbers can have a number of consequences, such as elog running away, burning CPU time etc (looking for a previous entry that does not exist), or rogue listings of a entry ID no./# 0 (looking for a later entry that does not exist).

One caveat; I use Linux, and on elog 2.9.2.  Later elogs and Windows may have a different reaction to what I've written above.

 

Elog purists can now look again.

Michael Hibbard wrote:

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct think to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

 

  68774   Tue Apr 3 10:19:07 2018 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionWindows3.1.2Re: Create past Elog entry.

David answered the question already.

I would distinguish if this is a once-in-a-year event, where you are willing to edit the logfiles as an administrator to fix it -
or if it happens more weekly, and you want to enable the users to fix it themself.
 
If it happens once a year and you don't mind to do it yourself: write a little self "how-to" and do it like David suggested.
If it happens more frequent and you prefer your users to fix it themself: introduce a "when" attribute as described in elog:67712
 
Cheers, Andreas
 
PS: Changing entry IDs $@MID@$ is only for people who know exactly what they are doing. You need to change all references to the IDs as well (Reply to: attributes) and all cross references (like the one elog:67712).
 
Michael Hibbard wrote:

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct think to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

 

  68775   Tue Apr 3 22:34:49 2018 Smile Michael Hibbardmichael.hibbard@cern.chQuestionWindows3.1.2Re: Create past Elog entry.

Thank you David, Andreas. Very useful forum.

David Pilgram wrote:

Hi Michael,

Elog purists, look away now.

There is an "official" way to do this, which is to have fields for entry date (so can be in the past), but the yymmdda.log file will be of the date and time you make the entry.  This is in the offical documentation.

If you are not bothered by the ID number being out of sequence (and elog does not really mind, although it occasionally throws a hissy fit/throws its toys out of the pram, which a restart sorts out), but you are one who wants the date of the entry in the log file to also be in the past, skipping the entry date fields issue, it's perfectly do-able.  So long as you can access the yymmdda.log files.

What I, and some others, do is to create a new entry now (for ease, the first entry of the day, but that's not critical), then go to the log files, and with an editor open today's file, find the entry, and edit the day, date and if necessary time; I always set the time as post 22:00, as code for an edited late entry.  I also then cut-and-paste the entry into the log file for the day it should have been entered in (creating it if necessary, in linux make sure the permissions are correct, specifically the user).

If you have attachments, and want those also to reflect the date, you'll need to edit the Attachments section of the elog entry headers (format is obvious), and also rename the attachment files in the directory.

I've not tried an ID number being other than an integer, I guess it would not work.  ID numbers not being in sequence with the date doesn't seem to matter.  Messing with ID numbers can have a number of consequences, such as elog running away, burning CPU time etc (looking for a previous entry that does not exist), or rogue listings of a entry ID no./# 0 (looking for a later entry that does not exist).

One caveat; I use Linux, and on elog 2.9.2.  Later elogs and Windows may have a different reaction to what I've written above.

 

Elog purists can now look again.

Michael Hibbard wrote:

Hello, Sorry if this has been addressed elsewhere, but I could not find info.

I am wanting to submit a new elog entry (that should have been) for a past date, to predate log entrys currently in my system.

I assume I must manually create a new .log file. What ID# should I assign to this entry? Should I sub-increment (i.e 33.1)? I presume the correct think to to would be to automate ID# increments in all sucessive logs with a script (python).

Please advise.

Thank you,

-Michael Hibbard

 

 

  68129   Mon Sep 28 06:29:57 2015 Reply Andreas Luedekeandreas.luedeke@psi.chBug reportAll3.1.1Re: Creating ELog Links not working properly in HTML Editor

I can confirm this bug.

But I don't think this has to work as you've described it, when using the HTML editor: if you use HTML, you can use the link feature of the editor.
But that link feature does currently not work at all with internal elog references, not even a simple elog:1">elog:1 (as you can see here). I suppose there is some more work to do for Stefan on that ;-)
 
Cheers, Andreas
Edmund Hertle wrote:

Hey,

the syntax for creating links to other elog entries has a small issue in the HTML editor. The link will not be created properly if there are whitespaces in the name of the logbook. Using ELCode (or in a simple attribute field) the whitespaces can be replaced by "+", but this does not work in the HTML editor. The work-around would be to use ELCode mark-up instead of HTML.

Example 1 (this should work): elog:Contributions/47

Example 2 (this will not work): elog:Config+Examples/11

Example 3 (will also not work): elog:Config%20Examples/11

 

  68132   Mon Sep 28 12:05:04 2015 Reply Stefan Rittstefan.ritt@psi.chBug reportAll3.1.1Re: Creating ELog Links not working properly in HTML Editor

Right, spaces won't work. But others work. Andreas, if you just put elog:1 without any link etc. just as plain text, it will be converted automatically into a link.

A workaround is to explicitly specify a link to an elog entry. Press the link button from the editor toolbar, enter a name and copy the full URL from the browser address bar, like here: https://midas.psi.ch/elogs/Forum/68129. If you switch to "Source" (Top left editor toolbar, you can changed the link name manually, like here.

Andreas Luedeke wrote:

I can confirm this bug.

But I don't think this has to work as you've described it, when using the HTML editor: if you use HTML, you can use the link feature of the editor.
But that link feature does currently not work at all with internal elog references, not even a simple elog:1">elog:1 (as you can see here). I suppose there is some more work to do for Stefan on that ;-)
 
Cheers, Andreas
Edmund Hertle wrote:

Hey,

the syntax for creating links to other elog entries has a small issue in the HTML editor. The link will not be created properly if there are whitespaces in the name of the logbook. Using ELCode (or in a simple attribute field) the whitespaces can be replaced by "+", but this does not work in the HTML editor. The work-around would be to use ELCode mark-up instead of HTML.

Example 1 (this should work): elog:Contributions/47

Example 2 (this will not work): elog:Config+Examples/11

Example 3 (will also not work): elog:Config%20Examples/11

 

 

ELOG V3.1.5-2eba886