Auto-increment substitutions broken with records for multiple days, posted by Richard Stamper on Wed Jun 24 15:02:49 2009
|
With a logbook defined by
[test]
Theme = default
Comment = Test of auto-increment
Attributes = Batch
Subst Batch = %Y%m%d-##
the auto-incrementing of the Batch attribute within dates works when the logbook contains only entries for
today's date but otherwise will give a batch number of "01" for each entry.
Changing line 8714 of elogd.c as follows, from:
/* if date part changed, start over with index */
if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) != 0)
old_index = 0;
else
/* retrieve old index */
if (atoi(attrib[index] + loc) > old_index)
old_index = atoi(attrib[index] + loc);
to
/* if date part changed, start over with index */
if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) != 0)
break; /* <------------- */
else
/* retrieve old index */
if (atoi(attrib[index] + loc) > old_index)
old_index = atoi(attrib[index] + loc);
appears to fix this bug when I test it. This code is inside a loop stepping back through all log entries, and
the variable old_index is already set to zero before the loop. The existing code resets old_index whenever the
prefix of the attribute string (containing a date) does not match the "current" value of that prefix as found in
retstr (set using strftime). So, if there are any records for dates other than today then old_index is reset
and attribute values will be set with the counter = (old_index+1) = 1. The modified version stops comparisons
once a different date is seen, but assumes that records are date ordered. An alternative patch:
/* if date part matches */
if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
/* retrieve old index */
if (atoi(attrib[index] + loc) > old_index)
old_index = atoi(attrib[index] + loc);
does not make this assumption and also appears to work OK when I test it. |
Re: Auto-increment substitutions broken with records for multiple days, posted by Stefan Ritt on Thu Jun 25 10:09:18 2009
|
> An alternative patch:
>
> /* if date part matches */
> if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
> /* retrieve old index */
> if (atoi(attrib[index] + loc) > old_index)
> old_index = atoi(attrib[index] + loc);
>
> does not make this assumption and also appears to work OK when I test it.
Yes, this is the right one, it searches all entries to have the same date than the current one, and then looks for the
largest index which will be stored in old_index and later incremented by one. I committed your patch to the
repository. Thanks a lot. |
Elog won't start, posted by Jean-Philippe Bertrand on Mon Jun 22 16:08:59 2009
|
We are currently having problems with Elog, I never had a problem installing it before but with my last 3 install I can't get it to work. We are running under Windows XP, the installation works perfectly but when I try to use the shortcut pointing to the localhost 8080, I get an error page from Internet Explorer telling me that the server cannot be found. I've rebootied the computer to make sure the server was running but still the same problem. Is there a basic requirement I should look at (Dotnet versionX or specific DLL required)? |
Re: Elog won't start, posted by Stefan Ritt on Mon Jun 22 16:44:54 2009
|
Jean-Philippe Bertrand wrote: |
We are currently having problems with Elog, I never had a problem installing it before but with my last 3 install I can't get it to work. We are running under Windows XP, the installation works perfectly but when I try to use the shortcut pointing to the localhost 8080, I get an error page from Internet Explorer telling me that the server cannot be found. I've rebootied the computer to make sure the server was running but still the same problem. Is there a basic requirement I should look at (Dotnet versionX or specific DLL required)?
|
No, there is no Dotnet or DLL required. Just start the ELOG server manually by clickin on Start/Programs/ELOG Server/Start ELOG server manually and watch if you can spot any error. One person reported that downloading again the package solved a similar problem. |
Re: Elog won't start, posted by Jean-Philippe Bertrand on Mon Jun 22 17:09:05 2009
|
Stefan Ritt wrote: |
Jean-Philippe Bertrand wrote: |
We are currently having problems with Elog, I never had a problem installing it before but with my last 3 install I can't get it to work. We are running under Windows XP, the installation works perfectly but when I try to use the shortcut pointing to the localhost 8080, I get an error page from Internet Explorer telling me that the server cannot be found. I've rebootied the computer to make sure the server was running but still the same problem. Is there a basic requirement I should look at (Dotnet versionX or specific DLL required)?
|
No, there is no Dotnet or DLL required. Just start the ELOG server manually by clickin on Start/Programs/ELOG Server/Start ELOG server manually and watch if you can spot any error. One person reported that downloading again the package solved a similar problem.
|
Thanks for the feedback, I found the problem, someone installed the AVG toolbar in Internet Explorer in the computers, and for some reason the AVG Error Redirection option prevents Elog from opening in Internet Explorer. |
Entries are being deleted automatically, posted by Pittelli Mike on Wed Jun 17 15:56:54 2009
|
A few days after I create entries in my logbooks, they are being deleted. Has this happened to anyone before? |
Re: Entries are being deleted automatically, posted by Stefan Ritt on Wed Jun 17 16:26:11 2009
|
Pittelli Mike wrote: |
A few days after I create entries in my logbooks, they are being deleted. Has this happened to anyone before?
|
Never as far as I know. Try to do logging on your elog server ("Log file = ..."), then you will see all write/delete accesses. So if someone deletes your entries, you will see a trace. |
Dropdown boxes and Moptions, posted by Arno Teunisse on Fri Jun 12 23:43:28 2009
|
Hello
I have a config file :
Attributes = Author, Author Email, Category, Customer, server,HPSD_ID, Cust_ID ,Subject , Change Window
; which fields will be shown !!
List display = ID,Author, Category, Customer, server, HPSD_ID, Cust_ID,Subject , Change Window
Type Change Window = datetime
# Type Change Window End = datetime
Options Category = Network , Server ,
Options Customer = Arag{A}, Frieslandbank{B}, Super de Boer{C}, NRE{D}
{A} Options server = arag-lin1,arag-lin2,arag-lin3,arag-lin4, arag-lin5, arag-lin6, arag-lin7
{B} Options server = rc1upas02, rc1upas22,rc1upas03,rc1upas04,rc1uptsm01,rc1upas07,rc1upas08
{C} Options server = xia61031,xia61032 ,xia61033,xia61034,xia61035,xia61036,xia61037,xia61038,xia61039,xia61040,xia61032 ,xia61033,xia61034,xia61035,xia61036,xia61037,xia61038,xia61039,xia61040
{D} Options server = server27,server32,server34 ,server37,server38,server40
Extendable options = Category , Customer,server
Required Attributes = server , customer, Subject, Change window Begin , Change Window End
This works OK, However when I change the {A} Options to {A} Moptions in the above code i get an error which tells me that a required field is not selected. So, with the pull down it works, with Moptions ( select boxes ) it will say that a required field is not selected. Any hints ?
regards Arno |
Re: Dropdown boxes and Moptions, posted by Stefan Ritt on Mon Jun 15 16:44:35 2009
|
Arno Teunisse wrote: |
Hello
I have a config file :
Attributes = Author, Author Email, Category, Customer, server,HPSD_ID, Cust_ID ,Subject , Change Window
; which fields will be shown !!
List display = ID,Author, Category, Customer, server, HPSD_ID, Cust_ID,Subject , Change Window
Type Change Window = datetime
# Type Change Window End = datetime
Options Category = Network , Server ,
Options Customer = Arag{A}, Frieslandbank{B}, Super de Boer{C}, NRE{D}
{A} Options server = arag-lin1,arag-lin2,arag-lin3,arag-lin4, arag-lin5, arag-lin6, arag-lin7
{B} Options server = rc1upas02, rc1upas22,rc1upas03,rc1upas04,rc1uptsm01,rc1upas07,rc1upas08
{C} Options server = xia61031,xia61032 ,xia61033,xia61034,xia61035,xia61036,xia61037,xia61038,xia61039,xia61040,xia61032 ,xia61033,xia61034,xia61035,xia61036,xia61037,xia61038,xia61039,xia61040
{D} Options server = server27,server32,server34 ,server37,server38,server40
Extendable options = Category , Customer,server
Required Attributes = server , customer, Subject, Change window Begin , Change Window End
This works OK, However when I change the {A} Options to {A} Moptions in the above code i get an error which tells me that a required field is not selected. So, with the pull down it works, with Moptions ( select boxes ) it will say that a required field is not selected. Any hints ?
regards Arno
|
Thanks for reporting this bug. I fixed it in SVN revisoin 2213. |
wrapping long lines in config file, posted by W.Koster on Fri Jun 12 16:59:18 2009
|
Greetings,
I was wondering, is it possible to wrap lines in the config file ?
I have to add a dropdown lost which is kinda long and typing everything on one line will make ik kinda unreadable.
Somehow wrapping the line so each entry will get on a separate line would make it much better readable. (which
makes less errors).
W.
|
Re: wrapping long lines in config file, posted by Stefan Ritt on Mon Jun 15 12:51:27 2009
|
W.Koster wrote: |
Greetings,
I was wondering, is it possible to wrap lines in the config file ?
I have to add a dropdown lost which is kinda long and typing everything on one line will make ik kinda unreadable.
Somehow wrapping the line so each entry will get on a separate line would make it much better readable. (which
makes less errors).
|
What I do is to use an editor with automatic wrapping functions, like the free PSPad editor. It nicely wraps line and indicates that:
 |
Re: wrapping long lines in config file, posted by W.Koster on Mon Jun 15 12:57:17 2009
|
Stefan Ritt wrote: |
What I do is to use an editor with automatic wrapping functions, like the free PSPad editor. It nicely wraps line and indicates that:
|
Hmmm... I have to use vi and was hoping an \ at the end of the line (before the LF) would be supported. |
Re: wrapping long lines in config file, posted by Stefan Ritt on Mon Jun 15 16:36:38 2009
|
W.Koster wrote: |
Stefan Ritt wrote: |
What I do is to use an editor with automatic wrapping functions, like the free PSPad editor. It nicely wraps line and indicates that:
|
Hmmm... I have to use vi and was hoping an \ at the end of the line (before the LF) would be supported. |
Use a real editor 
I seem to remember that Emacs can be configured for automatic line wrapping. |
search and datetime, posted by Arno Teunisse on Wed Jun 10 22:27:08 2009
|
Hello
I have the following in elog.cfg :
Attributes = Author, Author Email, Category, Customer, server, Subject , Change Window Begin , Change Window End
List display = ID,Author, Author Email, Category, Customer, server, Subject , Change Window Begin , Change Window End
Type Change Window Begin = datetime
Type Change Window End = datetime
So I want to be able to give a start and end date to the user. However : If I open a find/Search I see this :

There are for each Change Window <item> we get Start: and End: time entries. Was expecting only one date entrie .
Why is this ? Seems to be a feature of datetime or am i missing something.
|
Re: search and datetime, posted by Stefan Ritt on Mon Jun 15 12:56:32 2009
|
Arno Teunisse wrote: |
Hello
I have the following in elog.cfg :
Attributes = Author, Author Email, Category, Customer, server, Subject , Change Window Begin , Change Window End
List display = ID,Author, Author Email, Category, Customer, server, Subject , Change Window Begin , Change Window End
Type Change Window Begin = datetime
Type Change Window End = datetime
So I want to be able to give a start and end date to the user. However : If I open a find/Search I see this :

There are for each Change Window <item> we get Start: and End: time entries. Was expecting only one date entrie .
Why is this ? Seems to be a feature of datetime or am i missing something.
|
Right, that's a feature. Many people want to specify a range when doing a query on a date. Like Change Window Begin after Jan 1st, 2009 and before Jan 5th, 2009. If you just want a single date, set both Start: and End: to the same date, or actually the End: to Start+1 Day to cover all 24 hours of the Start: date. Otherwise when you have data + time, you would have to match the exact second to retrieve a certain entry. So having a range there is more powerful. |
I can not access the Logbook from another machine, posted by Gerardo Pruneda on Sun Jun 7 06:30:52 2009
|
I need some guidedance on how to access the logbook from another computer. I installed the logbook on a Windows server machine and started the logbook using port 81.
I can connect to the logbook on the same machine, but I can not access it from another machine on the same network.
I already confirm that the windows firewall is not enable. |
Re: I can not access the Logbook from another machine, posted by Stefan Ritt on Mon Jun 8 07:34:18 2009
|
Gerardo Pruneda wrote: |
I need some guidedance on how to access the logbook from another computer. I installed the logbook on a Windows server machine and started the logbook using port 81.
I can connect to the logbook on the same machine, but I can not access it from another machine on the same network.
I already confirm that the windows firewall is not enable.
|
Are your sure about the firewall, because this is the usual reason for that problem. Can you "ping" your server machine from the other machine (like "ping <server>"), maybe you have some network problems. |
I can not access the Logbook from another machine, posted by Gerardo Pruneda on Sun Jun 7 06:29:55 2009
|
I need some guidedance on how to access the logbook from another computer. I installed the logbook on a Windows server machine and started the logbook using port 81.
I can connect to the logbook on the same machine, but I can not access it from another machine on the same network.
I already confirm that the windows firewall is not enable. |
|