mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 12:41:00 +01:00
Merge pull request #14637 from lovesegfault/aws-crt-cpp-log-level
feat(libstore): tie AWS CRT logging to Nix verbosity level
This commit is contained in:
commit
3e9104c9ca
1 changed files with 12 additions and 1 deletions
|
|
@ -79,7 +79,18 @@ class AwsCredentialProviderImpl : public AwsCredentialProvider
|
|||
public:
|
||||
AwsCredentialProviderImpl()
|
||||
{
|
||||
apiHandle.InitializeLogging(Aws::Crt::LogLevel::Warn, static_cast<FILE *>(nullptr));
|
||||
// Map Nix's verbosity to AWS CRT log level
|
||||
Aws::Crt::LogLevel logLevel;
|
||||
if (verbosity >= lvlVomit) {
|
||||
logLevel = Aws::Crt::LogLevel::Trace;
|
||||
} else if (verbosity >= lvlDebug) {
|
||||
logLevel = Aws::Crt::LogLevel::Debug;
|
||||
} else if (verbosity >= lvlChatty) {
|
||||
logLevel = Aws::Crt::LogLevel::Info;
|
||||
} else {
|
||||
logLevel = Aws::Crt::LogLevel::Warn;
|
||||
}
|
||||
apiHandle.InitializeLogging(logLevel, stderr);
|
||||
}
|
||||
|
||||
AwsCredentials getCredentialsRaw(const std::string & profile);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue