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

Finer control over logging and reporting #2

Open
MatthewHambley opened this issue Feb 4, 2020 · 3 comments
Open

Finer control over logging and reporting #2

MatthewHambley opened this issue Feb 4, 2020 · 3 comments

Comments

@MatthewHambley
Copy link
Contributor

At the moment "systest" likes to take control of logging and report generation. For our use it would be better if we could control more finally what is logged and what is reported.
For instance we would like to be able to control logging to file on and off. We would also like to be able to choose whether the graph reports are produced. Our GitHub action environments do not have "dot" so that stage always fails.
Before I undertake any work, is this something which would fit with the model of operation intended for this framework?

@eerimoq
Copy link
Owner

eerimoq commented Feb 4, 2020

systest does not configure logging by default. It's the users decision whether to call configure_logging(), or to configure logging directly using the standard library logging module.

We could make dot optional.

@MatthewHambley
Copy link
Contributor Author

The problem I'm interested in tackling is that if the user does not call configure_logging() they get no terminal output and no log file. If they do call that function then they get both. If they want only one then they have to, as you say, do a load of manual setup. That manual setup involves copying code already existing in systest and which contains quite a lot of knowledge about the internal workings of the library.
What I'm imagining is finer control to support those of us who want terminal output but not a log file. Others may want it the other way round and they are also not well served by the current solution.
As far as reporting is concerned I wonder if the more flexible solution is to have the Sequencer return a result object from its run() method. This could then be passed to report generators. Alternatively, and preserving the existing run() API, the report generators could be converted to objects which are then registered with the sequencer. That way control over what reports are generated is a matter of which objects you register with it.

@eerimoq
Copy link
Owner

eerimoq commented Feb 5, 2020

We could add keyword parameters to configure_logging() to control where to log.

Does summary_json() suite your report needs?

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