Dserver logging default behaviour
|
|
---|---|
Hi, i have a question regarding logging in Tango. One of its type is dserver-level logging which is AFAIK at the warning level by default. Is there any way of configuring the default behaviour? If i execute "StopLogging" command on dserver device it indeed stops logging but as soon as I restart the device, the login returns to the warning level. It is a problem for us because one of our devices keeps logging a lot (log files up to 10GB from dserver) but with no need to do so. Thanks for any help! Cheers, Michal SOLARIS |
|
|
---|---|
Hi Michal There are device properties to control the Tango logging. You can try adding the logging_level device property set to "ERROR", or some other level. https://tango-controls.readthedocs.io/en/latest/development/advanced/reference.html#the-device-logging https://tango-controls.readthedocs.io/projects/rfc/en/latest/14/Logging.html#specification It could also be that you are passing a log level on the command line. E.g,. adding the "-v1" option would give the least logs, and "-v5" the most. Note that adding this option will cause logs be output to the console (i.e., it adds the logging target "console"). /Anton |
|
|
---|---|
Hi Anton thank you for your reply! Problem in particular is with Sardana servers and indeed we modify default logging behaviour with our patch by playing with log level. Strange thing is that it logs in "main" location by rotating five 10Mb files (like Sardana does), and in paralell in location /var/tmp/ds.log/ it logs those huge files. Since this seems like Sardana-specific or our patch-specific thing, i will move this discussion to Sardana issue. Thanks for help! Michal |
|
|
---|---|
Hi Michal, What is logged under /var/tmp/ds.log are files created by the Starter which logs the stderr output of each device server started with the Starter. You can then see easily the content of this file by doing a right click on a device server on Astor and by clicking on the "Standard Error" menu item. This feature is especially useful when you have a device server which does not start up and logs an error in the standard error. It can also helps to see the last error reported on the standard error when a device server crashed. You problem here is that you have a device server which is logging a lot on the standard error. We discussed this again this week with some colleagues at the ESRF and we think it would be useful to implement some rotation of these log files. Cheers, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, Thanks for the explanation! Yes i can see it with Astor, I suppose that this behaviour is not configurable? Since Sardana AFAIK uses python logging maybe this is the reason (or our patch affects it). Anyway some reasonable size limitation for this logs sounds like a good idea. Cheers, Michal |