rename module
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
```go
|
||||
import (
|
||||
"log/syslog"
|
||||
"github.com/sirupsen/logrus"
|
||||
lSyslog "github.com/sirupsen/logrus/hooks/syslog"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
lSyslog "git.corp.kornet35.ru/gopkg/logrus/hooks/syslog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -24,8 +24,8 @@ If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "
|
||||
```go
|
||||
import (
|
||||
"log/syslog"
|
||||
"github.com/sirupsen/logrus"
|
||||
lSyslog "github.com/sirupsen/logrus/hooks/syslog"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
lSyslog "git.corp.kornet35.ru/gopkg/logrus/hooks/syslog"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -54,8 +54,8 @@ package main
|
||||
import (
|
||||
"log/syslog"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
logrus_syslog "github.com/sirupsen/logrus/hooks/syslog"
|
||||
log "git.corp.kornet35.ru/gopkg/logrus"
|
||||
logrus_syslog "git.corp.kornet35.ru/gopkg/logrus/hooks/syslog"
|
||||
)
|
||||
|
||||
type customHook struct {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !windows && !nacl && !plan9
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package syslog
|
||||
@@ -7,7 +8,7 @@ import (
|
||||
"log/syslog"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
)
|
||||
|
||||
// SyslogHook to send logs via syslog.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//go:build !windows && !nacl && !plan9
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package syslog
|
||||
@@ -6,7 +7,7 @@ import (
|
||||
"log/syslog"
|
||||
"testing"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
)
|
||||
|
||||
func TestLocalhostAddAndPrint(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"io/ioutil"
|
||||
"sync"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
)
|
||||
|
||||
// Hook is a hook designed for dealing with logs in test scenarios.
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"git.corp.kornet35.ru/gopkg/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Send logs of given levels to any object with `io.Writer` interface.
|
||||
## Usage
|
||||
|
||||
If you want for example send high level logs to `Stderr` and
|
||||
logs of normal execution to `Stdout`, you could do it like this:
|
||||
logs of normal execution to `Stdout`, you could do it like this:
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus/hooks/writer"
|
||||
log "git.corp.kornet35.ru/gopkg/logrus"
|
||||
"git.corp.kornet35.ru/gopkg/logrus/hooks/writer"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -3,7 +3,7 @@ package writer
|
||||
import (
|
||||
"io"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
log "git.corp.kornet35.ru/gopkg/logrus"
|
||||
)
|
||||
|
||||
// Hook is a hook that writes logs of specified LogLevels to specified Writer
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
log "git.corp.kornet35.ru/gopkg/logrus"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user