Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#2124) Add ability to initialize without logging #2295

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

AdmiringWorm
Copy link
Member

This PR makes changes to the API initialization method to allow
Chocolatey to allow the initialization to happen without enabling
logging.
Additionally changes have been made to allow adding extra loggers to be
added without overriding the logging
to the applications main chocolatey.log file.

These changes were necessary to allow programs (like ChocolateyGUI)
to add its own logging infrastructure without disabling logging
to the main log file.

fixes #2124

src/chocolatey/GetChocolatey.cs Outdated Show resolved Hide resolved
src/chocolatey/GetChocolatey.cs Outdated Show resolved Hide resolved
src/chocolatey/GetChocolatey.cs Outdated Show resolved Hide resolved
@AdmiringWorm AdmiringWorm requested a review from gep13 June 23, 2021 11:01
@gep13 gep13 changed the base branch from master to stable August 9, 2021 12:57
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13
Copy link
Member

gep13 commented Aug 9, 2021

@AdmiringWorm any thoughts on why this is failing the ubuntu build?

@vexx32
Copy link
Member

vexx32 commented Aug 9, 2021

Seems the nuget restore failed there with SSL issues, similar results for all dependent packages:

                 [exec] Restoring NuGet package NUnit.Runners.2.6.4.
                 [exec] WARNING: Unable to find version '2.6.4' of package 'NUnit.Runners'.
                 [exec]   https://api.nuget.org/v3/index.json: Unable to load the service index for source https://api.nuget.org/v3/index.json.
                 [exec]   The SSL connection could not be established, see inner exception.
                 [exec]   Authentication failed, see inner exception.
                 [exec]   Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
                 [exec]     at /build/mono-6.12.0.122/external/boringssl/ssl/handshake_client.c:1132
                 [exec]   https://www.nuget.org/api/v2/: Unable to load the service index for source https://www.nuget.org/api/v2/.
                 [exec]   The SSL connection could not be established, see inner exception.
                 [exec]   Authentication failed, see inner exception.
                 [exec]   Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
                 [exec]     at /build/mono-6.12.0.122/external/boringssl/ssl/handshake_client.c:1132

@gep13
Copy link
Member

gep13 commented Aug 9, 2021

@vexx32 yip, saw the same thing, and was just pinging @AdmiringWorm about it on Slack 😄

@gep13
Copy link
Member

gep13 commented Aug 9, 2021

@vexx32 @AdmiringWorm I have opened a PR attempting to address this here: #2314 Can you both have a review, and let me know what you think? Thanks!

This commit makes changes to the API initialization method to allow
Chocolatey to allow the initialization to happen without enabling
logging.
Additionally changes have been made to allow adding extra loggers to be
added without overriding the logging
to the applications main chocolatey.log file.

These changes were necessary to allow programs (like ChocolateyGUI)
to add its own logging infrastructure without disabling logging
to the main log file.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 6feee97 into chocolatey:stable Aug 9, 2021
@AdmiringWorm AdmiringWorm deleted the logging-append branch August 9, 2021 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API - Allow Lets.GetChocolatey to not initialize logging
3 participants