missionpinball / mpf

Mission Pinball Framework: Open source software to run a real pinball machine.
http://missionpinball.org
MIT License
217 stars 143 forks source link

Feature Request: Improvement log files #1672

Open worldpeace-germany opened 1 year ago

worldpeace-germany commented 1 year ago

Hello,

I switched from the virtual tutorial to a Cobra Pin OPP board and of course made some mistakes initially in the config file. On the way I got an error like

    raise ConfigFileError(msg, error_no, self.log.name if self.log else "", context, self._url_base) \
mpf.exceptions.config_file_error.ConfigFileError: Config File Error in OPP: You need to specify a chain as chain-card-number in: 3 Error Code: CFE-OPP-17 (https://docs.missionpinball.org/en/dev/logs/CFE-OPP-17.html)

This error was from the coil section of my config file. I believe the text could be improved, when it is either being said in the log that this issue comes from section coils, or if the the line number (even better) of the issue in the config file comes from. Luckily I only had one config file, so the name of the config file might be worth to mention as well.

In addition I only realized after fixing my issue that in

a chain as chain-card-number in: 3

the 3 is my coil number I had specified.

My problem is solved, this is purely a request to improve logging. I am using the current dev version of mpf.

jabdoa2 commented 1 year ago

Hey! Yeah it should specify that this is caused by a coil. Not sure if we know the config file though since we merge configs and probably loose that info.