MDSplus / mdsplus

The MDSplus data management system
https://mdsplus.org/
Other
75 stars 45 forks source link

add timestamps, client ip & name, pid to mdsip error logs, equivalent to "access" logs #2789

Open vadim-at-te opened 5 months ago

vadim-at-te commented 5 months ago

Affiliation Tokamak Energy, 173 Brook Dr, Milton, Abingdon, UK

Description MDSplus mdsip error logs are stored (by default) at /var/log/mdsplus/mdsipd/errors. The log entries do not have timestamps, process id, client ip - and this makes it much harder to troubleshoot connectivity problems. This is in contrast to /var/log/mdsplus/mdsipd/access entries which had all this information

Example I don't have a pseudocode but I am happy to implement the feature myself and submit it to a merge review if you point me in the right direction in your massive code base. Here are examples of a well-structure entries in "access" file and non-informative entries in "errors" file:

$ tail -1 /var/log/mdsplus/mdsipd/access Wed Jun 12 09:07:12 2024 (0) (pid 1602200) Connection received from peter. ...REDACTED...@s...REDACTED....local [192....REDACTED-IP...] $ tail -1 /var/log/mdsplus/mdsipd/errors Connected: James....REDACTED-lastname

Notice how the error logs are more or less useless.

Additional context Thank you in advance

mwinkel-dev commented 5 months ago

Hi @vadim-at-te -- Yes, the mdsip service definitely needs better logging. Thanks for listing the requirements for your site.

Note that this request is a duplicate of #2683.