Bug #2749

missing clear button for watch file text area

Added by G. Walck over 6 years ago. Updated over 6 years ago.

Status:ResolvedStart date:11/22/2017
Priority:NormalDue date:
Assignee:L. Schillingmann% Done:

0%

Category:-
Target version:-

Description

There used to be a clear button to clear the watch file text zone. see attached picture.

vdemo-famula.png (105 KB) G. Walck, 11/22/2017 04:09 PM

History

#1 Updated by L. Schillingmann over 6 years ago

I replaced the logging window with a xterm instance that is embedded into vdemo. I wonder how important it is to show logs within vdemo aynway. Some people would argue for removing it as displaying logs is potentially the job of a dedicated component. What do you think from your perspective? How important is the clear log functionality?

#2 Updated by R. Haschke over 6 years ago

I see. It was always handy to see the output of our main HSM log directly in vdemo. However, we could also open the log window of that component explicitly...
I'm not sure whether the displayed log components extend in an online fashion or whether they represent a static snapshot at the display time. Would be nice to have the former behaviour.

Hence, I would propose to drop VDEMO_watch feature completely.

#3 Updated by L. Schillingmann over 6 years ago

The current xterm solution is a xterm + tail -f. It should update automatically if the file is updated.

#4 Updated by L. Schillingmann over 6 years ago

I changed it a bit so it will clear on strg+c. The tail -f is changed to tail -F to pickup new files, recreation, etc.
While this solution is a bit less flexible in some sense, it will handle some stuff better: fast growing log files, color codes, etc. in logfiles.

#5 Updated by G. Walck over 6 years ago

So I tested this and I had a failure first


tail: cannot open '/tmp/vdemo-gwalck/component_hsm.hsm.log' for reading: No such file or directory

then looked and it seems that the files have new names now :

/tmp/vdemo-gwalck/VDEMO_component_hsm.hsm.log

I guess I have to change the naming or is it also an unwanted change ?

#6 Updated by L. Schillingmann over 6 years ago

The reason for this is a bit more complicated. First the VDEMO_ prefix is unnecessary, so I changed it back to its default. The change was introduced because I consolidated some config files into the vdemo default and did not double check for defaults in the component_suffix.

Previously $VDEMO_logfile_prefix was checked in vdemo_standard_component_suffix.sh. However, this makes this variable only available if this script is sourced which is ok for component_scripts. However, the variable is not available in configuration scripts, which in my view makes things more difficult.

So I moved $VDEMO_logfile_prefix to vdemo2.sh. It is initially set there and can be overridden by the vdemo configuration. Its exported via ssh to all hosts.

This will also make it available in sfb.sh regardless if it is sourced locally or remotely. I think you could change:
sfb.sh:export VDEMO_watchfile=/tmp/vdemo-$USER/component_hsm.hsm.log
to:
sfb.sh:export VDEMO_watchfile=${VDEMO_logfile_prefix}hsm.hsm.log

#7 Updated by L. Schillingmann over 6 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF