8000 Add callback feature to `Start-Transcript` · Issue #17588 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Add callback feature to Start-Transcript #17588
@iRon7

Description

@iRon7

Summary of the new feature / enhancement

Judging from the StackOverflow questions, it appears to me that custom log files implementations are more often used then the native Start-Transcript cmdlet and suspect that this is due to the fact enterprise companies (as the one I am working for) want their own logging facilities which might be a specific log format (e.g. including a specific time stamp per entry) up till writing (specific) entries to a database.

Proposed technical implementation details (optional)

A -Script <ScriptBlock> parameter that refers to a script that is called at each logging event. Within the script (which might need to run in a different scope), I would expect to have access to information (via current item ($_)?) as:

  • A reference to thr output streams since last event
  • The timestamp of the event (basically the current time)
  • Transcript properties/parameters (as the Path if supplied)
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-DeclinedThe proposed feature is declined.WG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0