File tree 21 files changed +38
-38
lines changed
21 files changed +38
-38
lines changed Original file line number Diff line number Diff line change 5
5
## Installation and usage
6
6
7
7
``` bash
8
- $ go get gopkg.in/ alog.v1
8
+ $ go get github.com/antlinker/ alog
9
9
```
10
10
11
11
## API documentation
12
12
13
- * [ https://godoc.org/gopkg.in/ alog.v1 ] ( https://godoc.org/gopkg.in/ alog.v1 )
13
+ * [ https://godoc.org/github.com/antlinker/ alog ] ( https://godoc.org/github.com/antlinker/ alog )
14
14
15
15
## Configuration file
16
16
@@ -23,7 +23,7 @@ $ go get gopkg.in/alog.v1
23
23
level: 1,
24
24
# 日志项模板
25
25
item: {
26
- # 项模板
26
+ # 项模板
27
27
# 模板字段说明:
28
28
# ID 唯一标识
29
29
# Time 日志发生时间
@@ -59,7 +59,7 @@ $ go get gopkg.in/alog.v1
59
59
# 1表示打印
60
60
# 2表示不打印
61
61
# 默认为不打印
62
- print: 2 ,
62
+ print: 1 ,
63
63
# 日志输出规则
64
64
# 参数说明:
65
65
# 0表示所有配置输出
@@ -69,29 +69,29 @@ $ go get gopkg.in/alog.v1
69
69
# 默认为所有配置输出(0)
70
70
rule: 0,
71
71
# 日志级别
72
- level: 1,
72
+ level: 1,
73
73
# 输出文件信息
74
74
# 1表示输出
75
75
# 2表示不输出
76
76
# 默认为输出(1)
77
77
showfile: 1,
78
78
# 文件信息调用层级
79
- # 默认为5 (当前调用)
80
- caller: 5 ,
79
+ # 默认为6 (当前调用)
80
+ caller: 6 ,
81
81
# 读取缓冲区时间间隔(以秒为单位)
82
82
interval: 1,
83
83
# 目标存储
84
84
# 指向store中定义的存储配置
85
- target: "file_global",
85
+ # target: "file_global",
86
86
# 缓冲区存储
87
- buffer: {
87
+ # buffer: {
88
88
# 存储引擎
89
89
# 1表示内存存储
90
90
# 2表示redis存储
91
- engine: 1,
91
+ # engine: 1,
92
92
# 指向store中定义的存储配置
93
- target: "redis_buffer"
94
- }
93
+ # target: "redis_buffer"
94
+ # }
95
95
},
96
96
# 标签配置
97
97
tags: [{
@@ -230,7 +230,7 @@ package main
230
230
import (
231
231
" time"
232
232
233
- " gopkg.in/ alog.v1 "
233
+ " github.com/antlinker/ alog"
234
234
)
235
235
236
236
func main () {
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import (
4
4
"fmt"
5
5
"os"
6
6
7
- "gopkg.in/ alog.v1 /utils"
7
+ "github.com/antlinker/ alog/utils"
8
8
9
- "gopkg.in/ alog.v1 /log"
10
- "gopkg.in/ alog.v1 /manage"
9
+ "github.com/antlinker/ alog/log"
10
+ "github.com/antlinker/ alog/manage"
11
11
)
12
12
13
13
// ALog 提供ALog日志模块的输出管理
Original file line number Diff line number Diff line change 4
4
"container/list"
5
5
"sync"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
// NewMemoryBuffer 创建新的Memory实例
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
func TestMemoryPush (t * testing.T ) {
Original file line number Diff line number Diff line change 4
4
"encoding/json"
5
5
"fmt"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
"gopkg.in/redis.v3"
9
9
)
10
10
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
func TestRedisPush (t * testing.T ) {
Original file line number Diff line number Diff line change 1
1
package alog
2
2
3
- import "gopkg.in/ alog.v1 /log"
3
+ import "github.com/antlinker/ alog/log"
4
4
5
5
// 加载默认配置
6
6
func loadDefaultConfig () * log.LogConfig {
Original file line number Diff line number Diff line change 1
1
package alog
2
2
3
- import "gopkg.in/ alog.v1 /log"
3
+ import "github.com/antlinker/ alog/log"
4
4
5
5
var (
6
6
// 提供全局的ALog
Original file line number Diff line number Diff line change 5
5
"strings"
6
6
"time"
7
7
8
- "gopkg.in/ alog.v1 /utils"
8
+ "github.com/antlinker/ alog/utils"
9
9
)
10
10
11
11
// GetDateData 获取日期数据
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ import (
10
10
"text/template"
11
11
"time"
12
12
13
- "gopkg.in/ alog.v1 /buffer"
14
- "gopkg.in/ alog.v1 /log"
15
- "gopkg.in/ alog.v1 /store"
16
- "gopkg.in/ alog.v1 /utils"
13
+ "github.com/antlinker/ alog/buffer"
14
+ "github.com/antlinker/ alog/log"
15
+ "github.com/antlinker/ alog/store"
16
+ "github.com/antlinker/ alog/utils"
17
17
)
18
18
19
19
// NewLogManage 创建新的LogManage实例
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package manage
3
3
import (
4
4
"testing"
5
5
6
- "gopkg.in/ alog.v1 /log"
6
+ "github.com/antlinker/ alog/log"
7
7
)
8
8
9
9
func TestConsole (t * testing.T ) {
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
- "gopkg.in/ alog.v1 "
4
+ "github.com/antlinker/ alog"
5
5
)
6
6
7
7
func main () {
Original file line number Diff line number Diff line change 5
5
"fmt"
6
6
"time"
7
7
8
- "gopkg.in/ alog.v1 "
8
+ "github.com/antlinker/ alog"
9
9
)
10
10
11
11
const (
Original file line number Diff line number Diff line change 5
5
"fmt"
6
6
"time"
7
7
8
- "gopkg.in/ alog.v1 "
8
+ "github.com/antlinker/ alog"
9
9
)
10
10
11
11
const (
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package main
3
3
import (
4
4
"time"
5
5
6
- "gopkg.in/ alog.v1 "
6
+ "github.com/antlinker/ alog"
7
7
)
8
8
9
9
func main () {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package store
3
3
import (
4
4
"text/template"
5
5
6
- "gopkg.in/ alog.v1 /log"
6
+ "github.com/antlinker/ alog/log"
7
7
"gopkg.in/olivere/elastic.v3"
8
8
)
9
9
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
func TestElasticStore (t * testing.T ) {
Original file line number Diff line number Diff line change 7
7
"strings"
8
8
"text/template"
9
9
10
- "gopkg.in/ alog.v1 /log"
10
+ "github.com/antlinker/ alog/log"
11
11
)
12
12
13
13
type _FileConfig struct {
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
func TestFileStore (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package store
3
3
import (
4
4
"text/template"
5
5
6
- "gopkg.in/ alog.v1 /log"
6
+ "github.com/antlinker/ alog/log"
7
7
8
8
"gopkg.in/mgo.v2"
9
9
)
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "gopkg.in/ alog.v1 /log"
7
+ "github.com/antlinker/ alog/log"
8
8
)
9
9
10
10
func TestMongoStore (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments