Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow capturing logs as string #502

Open
jerr0328 opened this issue Nov 23, 2021 · 2 comments
Open

Allow capturing logs as string #502

jerr0328 opened this issue Nov 23, 2021 · 2 comments

Comments

@jerr0328
Copy link

Describe the new feature

Similar to #188, I want to be able to capture the PuLP output and put it all in a single log line, rather than having it go to stdout directly. Instead of creating a temporary file and pointing PuLP to the log file, I would like to be able to get the log output as a string, similar to how you can do it with subprocess.check_output(). Alternatively, we could provide a file object (like StringIO) if that's easier.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

#188

Does this feature exist in another product or project? Please provide a link.

Python has a native way of getting output from subprocess command calls: https://docs.python.org/3/library/subprocess.html#subprocess.check_output

@pchtsp
Copy link
Collaborator

pchtsp commented Nov 28, 2021

This make sense, many commercial solvers already provide a file object interface, if I remember correctly. I'd love to check a PR if you feel like helping out : )

@rimaddo
Copy link
Contributor

rimaddo commented Dec 30, 2022

Is this feature implemented in #525?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants