Skip to content

Add timestamp to pshost trace listener - #9230

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:trace-timestamp
Apr 1, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:trace-timestamp

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Mar 26, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Insert timestamp to the beginning of the trace. Looks like:

DEBUG: 2019-03-26 10:52:35.4088 SessionState Information: 0 :  WriteLine   Drive found in scope 0
DEBUG: 2019-03-26 10:52:35.4090 LocationGlobber Information: 0 :  WriteLine   path = Users/steve/repos/PowerShell
DEBUG: 2019-03-26 10:52:35.4091 CmdletProviderClasses Information: 0 :  WriteLine   basePath = /
DEBUG: 2019-03-26 10:52:35.4093 CmdletProviderClasses Information: 0 :  WriteLine   tokenizedPathStack.Push(PowerShell)

PR Context

When using Trace-Command with -PSHost, you don't get timestamp traces. This can be useful to determine where the command/expression is spending its time.

PR Checklist

@adityapatwardhan

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) can you respond the Ilya (@iSazonov) comment.

@adityapatwardhan

Copy link
Copy Markdown
Member

PoshChan-Bot (@PoshChan) Please restart static-analysis

@PoshChan

This comment has been minimized.

@adityapatwardhan

This comment has been minimized.

@PoshChan

This comment has been minimized.

@adityapatwardhan

Copy link
Copy Markdown
Member

PoshChan-Bot (@PoshChan) Please rerun staging

@PoshChan

Copy link
Copy Markdown
Collaborator

Aditya Patwardhan (@adityapatwardhan), did not find matching build context: PowerShell-CI-static-analysis; allowed contexts: PowerShell-CI-linux, PowerShell-CI-macos, PowerShell-CI-windows

@adityapatwardhan

Copy link
Copy Markdown
Member

PoshChan-Bot (@PoshChan) Please retry staging

@PoshChan

Copy link
Copy Markdown
Collaborator

Aditya Patwardhan (@adityapatwardhan), did not find matching build context: PowerShell-CI-static-analysis; allowed contexts: PowerShell-CI-linux, PowerShell-CI-macos, PowerShell-CI-windows

@adityapatwardhan

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) for Posh-Chan bot issue.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 8a0ecaf into PowerShell:master Apr 1, 2019
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Apr 1, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the trace-timestamp branch April 2, 2019 16:49
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Static analysis CI was executed separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants