EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: procServ --logstamp argument
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Tue, 24 Nov 2020 19:18:00 +0100
Well,

The idea is the following:
The strftime() call is used when logging.
If the stampformat is configured (optional argument to --logstamp), it is used in the strftime() call.
If the stampformat is not configured, it is set to the timeformat (argument to --timefmt) with brackets around and followed by a space. The default for timeformat is "%c".

But I have to admit that all testing of procServ is manual and not complete.
In your case, the optional argument to "--logstamp" seems to have been misinterpreted as an argument to "--logport"? That's weird.

Cheers,
~Ralph


On Tue, 24 Nov 2020 at 17:25, Mark Rivers <rivers at cars.uchicago.edu> wrote:

Hi Ralph,

 

I am trying to have procServ output a timestamp in a user-specified format, and I don’t understand the syntax of –logstamp.

 

I am running procServ v2.8.0

corvette:/usr/local/bin>procServ --version

procServ Process Server 2.8.0

 

This is the help on the –logstamp option

corvette:/usr/local/bin>procServ -h

    --logstamp [<str>]    prefix log lines with timestamp [strftime format]

 

The default time format used in procServ is “%c”.  I would like to use “%c “, so there a blank space between the timestamp and the rest of the line.

 

Do I interpret help output correctly that the [] brackets in the argument to –logstamp are meant to symbolize “optional”, and that they should not be present in the command?  And that the optional argument is a user-defined timestamp format?

 

Here is my attempt, and the resulting procServ error.

 

/usr/local/bin/procServ --logstamp "%c " -n "13E1608_1_IOC" -L /home/epics/logs/13E1608_1.log 20332 /home/epics/support/CARS/iocBoot/ioc13MeasCompE1608_1/start_epics

Invalid socket spec '%c '

 

However, when I use –timefmt to specify the timestamp format it works. 

 

/usr/local/bin/procServ --logstamp --timefmt "%c " -n "13E1608_1_IOC" -L /home/epics/logs/13E1608_1.log 20332 /home/epics/support/CARS/iocBoot/ioc13MeasCompE1608_1/start_epics

/usr/local/bin/procServ: spawning daemon process: 32064

 

It turns out that I no longer actually need to change the format, because v2.8.0 which I just updated to automatically adds brackets and a space between the timestamp and the rest of the line.

 

But it seems like the optional argument to –logstamp is not working, or I just don’t understand it?

 

Thanks,

Mark

 


Replies:
RE: procServ --logstamp argument Mark Rivers via Tech-talk
References:
procServ --logstamp argument Mark Rivers via Tech-talk

Navigate by Date:
Prev: Re: ADEiger for EIGER2 Perez Juarez, Emilio (DLSLtd, RAL, LSCI) via Tech-talk
Next: RE: procServ --logstamp argument Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: procServ --logstamp argument Mark Rivers via Tech-talk
Next: RE: procServ --logstamp argument Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 24 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·