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

Create searchable and visually obvious errors in logs when possible #200

Open
MartinFlores751 opened this issue Apr 26, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@MartinFlores751
Copy link
Contributor

Issue Notes

Stemming from #198.

It would be nice for both testing and debugging purposes to visually separate errors, and provide easy mechanisms for grepping them, for both test and script debugging.

An exaggerated example is as follows:

...                                                                                    
2024-04-26 14:55:53,340 - [rockylinux-9-mysql-8_irods-catalog-provider_1]: exception raised while running test                                                          
2024-04-26 14:55:53,340 - HERE IS THE EXCEPTION: ---------------> InvalidGitRepositoryError('/home/marflo/Documents/iRODS') <-----------------                          
2024-04-26 14:55:53,341 - [[1]]                                                                                                                                         
2024-04-26 14:55:53,341 - [[1]]                                                                                                                                         
2024-04-26 14:55:53,341 - ==== begin test run results ====                                                                                                              
...

Ideas for improvements

  • Have standard phrases that are easily grepable (e.g. "Caught Exception=[exception here]", or from the core tests "List of failed tests:")
    • Ideally doesn't clash with other phrases that may show up
  • For some python objects, f-printing using '!r' may provide more information (e.g. logger.debug(f'var=[{var!r}]'))
  • Possibly add some visual distinction (see dramatic example above)
    • Adding some whitespace between issues of interest may help too.
@alanking alanking added the enhancement New feature or request label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants