Title: Logging is initialized before the configuration file is processed. · Issue #6085 · PowerShell/PowerShell · GitHub
Open Graph Title: Logging is initialized before the configuration file is processed. · Issue #6085 · PowerShell/PowerShell
X Title: Logging is initialized before the configuration file is processed. · Issue #6085 · PowerShell/PowerShell
Description: On Unix systems (Linux and MacOS), PowerShell logging can be customized using the -settingsFile command-line option and it is assumed the file is processed before any logging occurs. On recent builds, this is no longer the case and loggi...
Open Graph Description: On Unix systems (Linux and MacOS), PowerShell logging can be customized using the -settingsFile command-line option and it is assumed the file is processed before any logging occurs. On recent buil...
X Description: On Unix systems (Linux and MacOS), PowerShell logging can be customized using the -settingsFile command-line option and it is assumed the file is processed before any logging occurs. On recent buil...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6085
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Logging is initialized before the configuration file is processed.","articleBody":"On Unix systems (Linux and MacOS), PowerShell logging can be customized using the -settingsFile command-line option and it is assumed the file is processed before any logging occurs.\r\n\r\nOn recent builds, this is no longer the case and logging is being initialized before the logging overrides are read from the configuration file resulting in logging using the default values.\r\n\r\nNote that logging initialization is currently through static constructors and any reference to the associated classes can cause initialization to occur. As a result, logging initialization is non-deterministic and can occur before logging overrides are processed.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\nCreate a powershell.config.json with a single configuration setting \"LogIdentity\": \"CustomPWSH\"\r\nLaunch PowerShell with -settingsFile powershell.config.json\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nOn Linux, PowerShell logs all events using the identity 'CustomPWSH'\r\n\r\nActual behavior\r\n---------------\r\nPowerShell logs all events using the default identity 'powershell'\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.0.1\r\nPSEdition Core\r\nGitCommitId v6.0.1\r\nOS Linux 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23)\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n","author":{"url":"https://github.com/dantraMSFT","@type":"Person","name":"dantraMSFT"},"datePublished":"2018-02-01T19:37:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/6085/PowerShell/issues/6085"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1ec60202-1cbe-2da1-d5a1-220c55c38d34 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1A0:3BEBFA:28055A4:3850BD1:6A54AD63 |
| html-safe-nonce | ff0b46fc1966dbece0bb161a545e183b46cd131450dd0a5b8cdd002c85d299fd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUEwOjNCRUJGQToyODA1NUE0OjM4NTBCRDE6NkE1NEFENjMiLCJ2aXNpdG9yX2lkIjoiMTYzNzA1NDMwODgwNDc2NzA3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 61cc120841e1dcd75dc802e4bca15d60a2b6891f8773979933e556c972214115 |
| hovercard-subject-tag | issue:293657111 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6085/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7a0a855ebd8332801e14030d96b6dd549118fd22783a9cdff10bf2711f8fb8e2/PowerShell/PowerShell/issues/6085 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7a0a855ebd8332801e14030d96b6dd549118fd22783a9cdff10bf2711f8fb8e2/PowerShell/PowerShell/issues/6085 |
| og:image:alt | On Unix systems (Linux and MacOS), PowerShell logging can be customized using the -settingsFile command-line option and it is assumed the file is processed before any logging occurs. On recent buil... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dantraMSFT |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width