Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Powershell 6.0.0-1.debian.9 logging to /var/log/syslog is too verbose... #6032

Copy link
Copy link
@k1rb

Description

@k1rb
Issue body actions

Hi there,

Opening /usr/bin/pwsh, typing in "hello world." and pressing enter yields 43 (+4 on exit) events to /var/log/syslog. This isn't the case with all of my servers but it is for all of my servers running Powershell 6.0.0-1.debian.9.

Here is the first log generated, as an example:

Jan 25 15:53:30 server-name powershell[18813]: (v6.0.0:7:11) [Command_Lifecycle:CommandStart.Method.Informational] Command Import-Module is Started.#012%n%nContext:%n        Severity = Informational#012        Host Name = ConsoleHost#012        Host Version = 6.0.0#012        Host ID = 183c0648-d3c2-4c60-9ba5-18204b3c9f81#012        Host Application = /opt/microsoft/powershell/6.0.0/pwsh.dll#012        Engine Version = 6.0.0#012        Runspace ID = b261234c-963d-4ab3-b814-03161505d08f#012        Pipeline ID = 1#012        Command Name = Import-Module#012        Command Type = Cmdlet#012        Script Name = #012        Command Path = #012        Sequence Number = 7#012        User = server-name\root#012        Connected User = #012        Shell ID = Microsoft.PowerShell#012%n%nUser Data:%n%n

17 lines later it's telling me that the console is ready for use:

Jan 25 15:53:31 server-name powershell[18813]: (v6.0.0:1:10) [Perftrack_ConsoleStartupStop:PowershellConsoleStartup.WinStop.Informational] PowerShell console is ready for user input

And then finally, 47 lines later it's done with:

Jan 25 16:10:08 server-name powershell[18813]: (v6.0.0:7:11) [Command_Lifecycle:CommandStop.Method.Informational] Command PSConsoleHostReadline is Stopped.#012%n%nContext:%n        Severity = Informational#012        Host Name = ConsoleHost#012        Host Version = 6.0.0#012        Host ID = 183c0648-d3c2-4c60-9ba5-18204b3c9f81#012        Host Application = /opt/microsoft/powershell/6.0.0/pwsh.dll#012        Engine Version = 6.0.0#012        Runspace ID = b261234c-963d-4ab3-b814-03161505d08f#012        Pipeline ID = 9#012        Command Name = PSConsoleHostReadline#012        Command Type = Function#012        Script Name = #012        Command Path = #012        Sequence Number = 42#012        User = server-name\root#012        Connected User = #012        Shell ID = Microsoft.PowerShell#012%n%nUser Data:%n%n

As you can imagine, running even a simple script would cause flooding of syslog and then worse for log servers downstream.

Is this "normal" now, is there a way to disable this behavior or at least redirect logging to another source, for instance to one that isn't sent off for parsing by log servers?

Thanks!

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Resolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.