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

Replace xia2 Chatter/Debug streams with proper Python logging calls #267

Closed
rjgildea opened this issue Dec 5, 2018 · 2 comments
Closed
Assignees

Comments

@rjgildea
Copy link
Contributor

rjgildea commented Dec 5, 2018

No description provided.

@rjgildea rjgildea self-assigned this Dec 5, 2018
@stale
Copy link

stale bot commented Jun 3, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in six months if no further activity occurs. Thank you for your contributions.

@Anthchirp
Copy link
Member

Anthchirp commented Sep 4, 2019

  • The next step would be to use setup_logging() in all xia2 dispatchers, at which point we can remove the reconfigure_streams_to_logging() function and roll its changes into the Chatter/Debug/Stdout classes.
  • From there on we can use logging as normal throughout xia2 and have it co-exist with the stream classes for a while.
  • Finally we can deprecate and remove the stream classes.

Anthchirp added a commit that referenced this issue Nov 12, 2019
Update all command line tools that import xia2 components to explicitly
create named log files and redirect all Chatter() and other stream
output to said log files.

Some commands that do not import from xia2 were not touched.

This is the first half of the first step of the list in #267
Anthchirp added a commit that referenced this issue Nov 14, 2019
Update all command line tools that import xia2 components to explicitly
create named log files and redirect all Chatter() and other stream
output to said log files.

Some commands that do not import from xia2 were not touched.

This is the first half of the first step of the list in #267
Anthchirp added a commit that referenced this issue Nov 18, 2019
phase 1 completed

Streams can now co-exist with logging until we deprecate/retire them.
Anthchirp added a commit that referenced this issue Feb 14, 2020
and replace it with Python logging.
Anthchirp added a commit that referenced this issue Feb 18, 2020
retire without replacement, as discussed
Anthchirp added a commit that referenced this issue Feb 18, 2020
Anthchirp added a commit that referenced this issue Feb 18, 2020
* Retire Stdout stream
* Add a NOTICE log level and associated logger.notice() function
* Change all logger.info(banner()) calls to notice log level
* Add colouring for console output. By default text (=info level)
  stays white, warnings are yellow, errors are red, and notice
  level messages are shown in bright green. Debug messages - when
  shown - are set to blue.
* Log files and redirected output remain unaffected
* Output colouring can be disabled using NO_COLOR environment variable
  cf. https://no-color.org
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

2 participants