Skip to content

Commit

Permalink
logging: prevent duplicates and incorrect levels (#2031)
Browse files Browse the repository at this point in the history
* logging: prevent duplicates and incorrect levels

* add changelog
  • Loading branch information
fairclothjm authored Sep 28, 2023
1 parent c0015bd commit 1c9d343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
FEATURES:
* Add support for setting `not_before_duration` argument on `vault_ssh_secret_backend_role`: ([#2019](https://github.com/hashicorp/terraform-provider-vault/pull/2019))

BUGS:
* Fix duplicate timestamp and incorrect level messages: ([#2031](https://github.com/hashicorp/terraform-provider-vault/pull/2031))

## 3.20.1 (Sep 13, 2023)
IMPROVEMENTS:
* Update dependencies ([#1958](https://github.com/hashicorp/terraform-provider-vault/pull/1958))
Expand Down
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package main

import (
"flag"
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"

Expand Down Expand Up @@ -35,5 +36,9 @@ func main() {
serveOpts.ProviderAddr = "hashicorp/vault"
}

// fix duplicate timestamp and incorrect level messages
// https://developer.hashicorp.com/terraform/plugin/log/writing#legacy-log-troubleshooting
log.SetFlags(log.Flags() &^ (log.Ldate | log.Ltime))

plugin.Serve(serveOpts)
}

0 comments on commit 1c9d343

Please sign in to comment.