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

Overload the * operator for Logged #88

Open
3 tasks
etianen opened this issue Feb 7, 2024 · 2 comments
Open
3 tasks

Overload the * operator for Logged #88

etianen opened this issue Feb 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@etianen
Copy link
Owner

etianen commented Feb 7, 2024

This can be used to create repetitions of log patterns.

  • Use this in the why test logging example like this:

    from logot import Logot, logged
    
    def test_poll_daemon(logot: Logot) -> None:
        app.start_poll()
        logot.wait_for(
            (logged.info("Poll started")) >> logged.info("Poll finished")) * 3
        )
  • Link to the log pattern matching docs from this example.

  • Implement with _from_compose to correctly flatten _OrderedAllLogged.

@etianen etianen added the enhancement New feature or request label Feb 7, 2024
@etianen etianen added this to the v1.0 milestone Feb 7, 2024
@etianen etianen changed the title Overload * operator for Logged Overload the * operator for Logged Feb 7, 2024
@etianen etianen added the wontfix This will not be worked on label Feb 9, 2024
@etianen
Copy link
Owner Author

etianen commented Feb 9, 2024

This is actually a bad idea. Should multiplying a log pattern join them with >> or &? It's unclear.

@etianen etianen closed this as completed Feb 9, 2024
@etianen etianen removed the wontfix This will not be worked on label Feb 15, 2024
@etianen etianen reopened this Feb 15, 2024
@etianen
Copy link
Owner Author

etianen commented Feb 15, 2024

Increasingly I think this is useful, and should join log patterns with the >> operator.

@etianen etianen removed this from the v1.0 milestone Feb 15, 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
Projects
None yet
Development

No branches or pull requests

1 participant