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

Advanced logging #19

Open
taglia opened this issue Apr 4, 2023 · 0 comments
Open

Advanced logging #19

taglia opened this issue Apr 4, 2023 · 0 comments

Comments

@taglia
Copy link

taglia commented Apr 4, 2023

Feature Suggestion

Using the logging module, rather than directly printing to stdout and stderr.

Description

I understand this would add an additional dependency, but I think the logging module is fairly standard and accepted. I have an issue handling SimFin output in my applications, since I already use stdout as one of my logging streams.

Code

I can create a PR if there is interest, there are only a few print statements.

Example

It would be a matter of replacing all calls to print, with corresponding calls to logging.

Examples:

  • print(msg, file=sys.stderr) would become logging.error(msg)
  • print(msg) would become logging.info(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant