Skip to content

Move CommandLineParameterParser.EarlyParse to UnmanagedPSEntry.Start to ensure early settingsfile parsing #7460

Closed

Description

Currently, there are a number of workarounds in the code base to handle the fact that logging needs to occur before the -SettingFile argument is parsed.

See:

While these changes workaround specific issues, we still have areas where logging settings are ignored due to logging before the logging settings in the setting file is parsed. PR 7449 presents a possible fix by parsing the -SettingFile argument earlier in command-line parsing. This change would move this logic to moving this logic to UnmanagedPSEntry.Start and avoid any further issues.

The call should be placed immediately before PSEtwLog.LogConsoleStartup(), the call should then be unconditional, and the conditional call in ConsoleHost can be removed.

Also revisit the SetSnapInLoggingInformation(coreMshSnapin) in PSSnapInReader.ReadCoreEngineSnapIn which is currently disabled on UNIX due to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions