terraform-provider-gitea/vendor/github.com/hashicorp/terraform-plugin-log/internal/hclogutils/logger_options.go
Tobias Trabelsi e1266ebf64
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
continuous-integration/drone/push Build encountered an error
updated GHA
Update to v2 SDK
updated dependencies
2022-08-06 16:21:18 +02:00

30 lines
925 B
Go

package hclogutils
import (
"github.com/hashicorp/go-hclog"
)
// LoggerOptionsCopy will safely copy LoggerOptions. Manually implemented
// to save importing a dependency such as github.com/mitchellh/copystructure.
func LoggerOptionsCopy(src *hclog.LoggerOptions) *hclog.LoggerOptions {
if src == nil {
return nil
}
return &hclog.LoggerOptions{
AdditionalLocationOffset: src.AdditionalLocationOffset,
Color: src.Color,
DisableTime: src.DisableTime,
Exclude: src.Exclude,
IncludeLocation: src.IncludeLocation,
IndependentLevels: src.IndependentLevels,
JSONFormat: src.JSONFormat,
Level: src.Level,
Mutex: src.Mutex,
Name: src.Name,
Output: src.Output,
TimeFormat: src.TimeFormat,
TimeFn: src.TimeFn,
}
}