LOG: added printout of rcParams at debug level#10039
Conversation
tacaswell
left a comment
There was a problem hiding this comment.
Slightly concerned about the verbosity.
|
Yeah if you set level to DEBUG you get a lot of output and it basically needs to go in a file. OTOH I don’t think there is any reason to be shy about verbose output when using debug. The motivation here is to just ask the user for one file rather than the debug output and the matpltolibrc. But I don’t feel strongly if this is seen as cluttering up the debug info. FWIW I usually put the logging info after the matpltolib import to keep the log shorter without all the startup info |
efiring
left a comment
There was a problem hiding this comment.
In addition, it might be good to include the output of matplotlib.get_fname(), which shows the source of the matplotlibrc file that might have modified the rcParams. This is probably more valuable for debugging than the full rcParams.
| locale.setlocale(locale.LC_ALL, '') | ||
|
|
||
| _log.debug('rcParams: ') | ||
| _log.debug(rcParams) |
There was a problem hiding this comment.
Suggested consolidation:
_log.debug('rcParams:\n%s', rcParams)
I think this will result in a more nicely-formatted output because it will not have the extra header info from the logging formatter at the start of the rcParams list.
|
it's #9761. |
|
OK, I think I agree that this is very very verbose, and indeed a more reliable way of asking a user for their rcParams is: from matplotlib import rcParams
print(rcParams)So I think I'll close this. |
PR Summary
In helping to debug #10016 I noted that there is no good way to see what the rcParams are in the debug interface. This seemed easy to add
PR Checklist