By default, on Linux, Tango DS log files are stored in /tmp/tango-// e.g. /tmp/tango-tangosys/RaspberryPiIO/ALD-Valves/ald_io_raspberrypiio-01.log
But, for example, on Debian 9 the /tmp will be erased on the next system startup (yes, this behavior can be changed, but we would prefer to keep the default Debian 9 behavior)
These logging files are important to be preserved on the system restart.
We thought to actually change the logging target and put it somewhere under /var/log which seems to be the right place for log files.
Is there any way to change the default /tmp/… path so that when we configure in Jive the “Logging target” to “file” it automatically set the “Current logging target” to a different path.
If not, what about specifying it in /etc/tangorc as we can do it now for TANGO_HOST on Debian?
I just tested it. The environment variable option works perfectly!
But I’m not able to set it via the configuration file. Neither via the local file ($HOME/.tangorc) nor via the global one (/etc/tangorc). Is anyone using it like this?
I think indeed this TANGO_LOG_PATH environment variable does not seem to be supported in tangorc files.
When looking at the code (cppTango/cppapi/server/logging.cpp at tango-9-lts · tango-controls/cppTango · GitHub) , it seems there is a simple call to ::getenv(kTangoLogPathVar) (with kTangoLogPathVar = “TANGO_LOG_PATH” )
There is nothing in this part of the code which will look for this environment variable into the tangorc files as it is done in some other parts of the code where some dedicated methods are called, like Connection::get_env_var() method, which can look for the env variable inside the tangorc files too.
If you want, you can create an issue (or PR! ;-)) about that.
Setting the TANGO_LOG_PATH environment variable via another way is a simple work-around.