slaclab / pysmurf

Other
2 stars 9 forks source link

Print statements should be replaced by calls to S.log #698

Open dpdutcher opened 2 years ago

dpdutcher commented 2 years ago

Almost all messages produced by pysmurf, with the exception of some warnings and errors, are made through calls to S.log(), which can be redirected to a logfile and kept out of stdout. There are a few remaining calls to print() that should be logged instead; by my count there are two instances that come up regularly:

https://github.com/slaclab/pysmurf/blob/f8d2ab14402a53ab81ef8191050a0f4478760a34/python/pysmurf/client/util/smurf_util.py#L351-L355

and

https://github.com/slaclab/pysmurf/blob/f8d2ab14402a53ab81ef8191050a0f4478760a34/python/pysmurf/client/util/SmurfFileReader.py#L263-L272

It would be great if these could also be called through S.log() instead of print().