Wrong log usage in new parsers
I found several occasions with parametrised log messages. This is wrong. Log messages should almost always be constant strings. Be aware that these logs are only partially meant for humans. We also need them to be analysable in order to manage the huge amounts logs that NOMAD produces.
Parameters should be passed as keyword arguments. And here, only those that are used for analyses and have certain significance should be added directly. For informative data you can use the data
keyword argument to pass a dictionary with additional values. Make sure that these data are json serializable.
Something like this (from the new vasp parser):
self.outcar_parser.logger.warn('Cannot determine lm fields for n_lm=%d' % n_lm)
Should be:
self.outcar_parser.logger.warn('Cannot determine lm fields', data=dict(n_lm=n_lm))
This is a huge pain with the old parsers, as they spam our log database with information that we cannot really use well and that is hard to swallow for the underlying elasticsearch.
@ladinesa We should fix this for the new parsers. Please go through all your log entries and adjust them accordingly. @himanel1 You should also be aware of this