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