Re: [Rdkit-discuss] Redirect error messages to a file in Python?

2024-02-01 Thread Joel Duerksen
I've changed my strategy a few times. I'll share my most recent approach, quite possibly this is flawed, but for now it works for me. Fixes and corrections welcome. I think these are all the relevant bits below... ... ... other stuff, import rdkit, etc... ... # fancy foot work to capture RDKIT

[Rdkit-discuss] Redirect error messages to a file in Python?

2024-02-01 Thread David Cosgrove
Hi, I'd like to be able to redirect the various logging streams to files from within the code. I know that I can turn them off: RDLogger.DisableLog('rdApp.*') but that's more extreme than I want. I have found the function RDLogger.AttachFileToLog() but can't work out how to use it. The naive