]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/hashicorp/go-hclog/global.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / go-hclog / global.go
CommitLineData
15c0b25d
AP
1package hclog
2
3import (
4 "sync"
5)
6
7var (
8 protect sync.Once
9 def Logger
10
11 // The options used to create the Default logger. These are
12 // read only when the Default logger is created, so set them
13 // as soon as the process starts.
14 DefaultOptions = &LoggerOptions{
15 Level: DefaultLevel,
16 Output: DefaultOutput,
17 }
18)
19
20// Return a logger that is held globally. This can be a good starting
21// place, and then you can use .With() and .Name() to create sub-loggers
22// to be used in more specific contexts.
23func Default() Logger {
24 protect.Do(func() {
25 def = New(DefaultOptions)
26 })
27
28 return def
29}
30
31// A short alias for Default()
32func L() Logger {
33 return Default()
34}