vendor: github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
updates the "logentries" dependency;
- checking error when calling output
- Support Go Modules
full diff: 7a984a84b5...fc06dab2ca
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
83b51522df
commit
8d5eebcc6e
5 changed files with 29 additions and 17 deletions
|
@ -15,7 +15,7 @@ require (
|
|||
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310
|
||||
github.com/aws/aws-sdk-go v1.31.6
|
||||
github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549
|
||||
github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
|
||||
github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5
|
||||
github.com/containerd/cgroups v1.0.3
|
||||
github.com/containerd/containerd v1.5.10
|
||||
|
|
|
@ -90,8 +90,8 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb
|
|||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
|
||||
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
|
||||
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
|
||||
github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549 h1:QJJnIXZ34OUK5JfWlq1l3n0SfO9g1amiLFIcTECgpq0=
|
||||
github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549/go.mod h1:313oBJKClgRD/+t59eUnrfG7/xHXZJd7v+SjCacDm4Q=
|
||||
github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8 h1:fcONpniVVbh9+duVZYYbJuc+yGGdLRxTqpk7pTTz/qI=
|
||||
github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8/go.mod h1:GrjfimWtH8h8EqJSfbO+sTQYV/fAjL/VN7dMeU8XP2Y=
|
||||
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
|
||||
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50=
|
||||
|
|
2
vendor/github.com/bsphere/le_go/.travis.yml
generated
vendored
2
vendor/github.com/bsphere/le_go/.travis.yml
generated
vendored
|
@ -1,4 +1,4 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
- 1.4
|
||||
- 1.12.x
|
||||
|
|
34
vendor/github.com/bsphere/le_go/le.go
generated
vendored
34
vendor/github.com/bsphere/le_go/le.go
generated
vendored
|
@ -127,9 +127,22 @@ func (logger *Logger) Flags() int {
|
|||
|
||||
// Output does the actual writing to the TCP connection
|
||||
func (logger *Logger) Output(calldepth int, s string) error {
|
||||
_, err := logger.Write([]byte(s))
|
||||
|
||||
return err
|
||||
var (
|
||||
err error
|
||||
waitPeriod = time.Millisecond
|
||||
)
|
||||
for {
|
||||
_, err = logger.Write([]byte(s))
|
||||
if err != nil {
|
||||
if connectionErr := logger.openConnection(); connectionErr != nil {
|
||||
return connectionErr
|
||||
}
|
||||
waitPeriod *= 2
|
||||
time.Sleep(waitPeriod)
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Panic is same as Print() but calls to panic
|
||||
|
@ -159,18 +172,18 @@ func (logger *Logger) Prefix() string {
|
|||
}
|
||||
|
||||
// Print logs a message
|
||||
func (logger *Logger) Print(v ...interface{}) {
|
||||
logger.Output(2, fmt.Sprint(v...))
|
||||
func (logger *Logger) Print(v ...interface{}) error {
|
||||
return logger.Output(2, fmt.Sprint(v...))
|
||||
}
|
||||
|
||||
// Printf logs a formatted message
|
||||
func (logger *Logger) Printf(format string, v ...interface{}) {
|
||||
logger.Output(2, fmt.Sprintf(format, v...))
|
||||
func (logger *Logger) Printf(format string, v ...interface{}) error {
|
||||
return logger.Output(2, fmt.Sprintf(format, v...))
|
||||
}
|
||||
|
||||
// Println logs a message with a linebreak
|
||||
func (logger *Logger) Println(v ...interface{}) {
|
||||
logger.Output(2, fmt.Sprintln(v...))
|
||||
func (logger *Logger) Println(v ...interface{}) error {
|
||||
return logger.Output(2, fmt.Sprintln(v...))
|
||||
}
|
||||
|
||||
// SetFlags sets the logger flags
|
||||
|
@ -187,11 +200,10 @@ func (logger *Logger) SetPrefix(prefix string) {
|
|||
// it adds the access token and prefix and also replaces
|
||||
// line breaks with the unicode \u2028 character
|
||||
func (logger *Logger) Write(p []byte) (n int, err error) {
|
||||
logger.mu.Lock()
|
||||
if err := logger.ensureOpenConnection(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
logger.mu.Lock()
|
||||
defer logger.mu.Unlock()
|
||||
|
||||
logger.makeBuf(p)
|
||||
|
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
|
@ -102,8 +102,8 @@ github.com/aws/aws-sdk-go/service/sts/stsiface
|
|||
# github.com/beorn7/perks v1.0.1
|
||||
## explicit; go 1.11
|
||||
github.com/beorn7/perks/quantile
|
||||
# github.com/bsphere/le_go v0.0.0-20170215134836-7a984a84b549
|
||||
## explicit
|
||||
# github.com/bsphere/le_go v0.0.0-20200109081728-fc06dab2caa8
|
||||
## explicit; go 1.12
|
||||
github.com/bsphere/le_go
|
||||
# github.com/cespare/xxhash/v2 v2.1.2
|
||||
## explicit; go 1.11
|
||||
|
|
Loading…
Reference in a new issue