Skip to content

Custom logging? (during test execution; not as a post-processed file) #447

@jazzdelightsme

Description

@jazzdelightsme

I'm testing some code that has its own logging (one powershell session ==> one log file).

I'd like to have Pester information logged to the same destination, as Pester is executing. That way, when I read my log file, I see things like "Describing " that come before the logging generated during that test. That will aid me in debugging what happened when a test failed (I will be able to tell what section of the log to investigate).

I can currently do this by hand by just putting lines like "Write-ToMyLog 'Now executing foo test'" into my test scripts, but it becomes pretty cumbersome and it would be cool to be able to have Pester do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions