File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,6 @@ func (c *Client) Log() (log *Log) {
72
72
log = & Log {
73
73
sling : c .sling .Path ("/log" ),
74
74
logger : c .logger ,
75
- AppID : c .AppID ,
76
- AppName : c .AppName ,
77
75
Level : LevelInfo ,
78
76
BatchSize : 60 ,
79
77
DispatchInterval : 60 ,
Original file line number Diff line number Diff line change 17
17
timer <- chan time.Time
18
18
mutex sync.RWMutex
19
19
logger * glog.Logger
20
- AppID string
21
- AppName string
22
20
Level Level
21
+ Fields Fields
23
22
BatchSize int
24
23
DispatchInterval int
25
24
}
@@ -142,9 +141,10 @@ func (l *Log) Log(level Level, fields Fields) {
142
141
}
143
142
144
143
fields .Add ("time" , time .Now ().Format (rfc3339Milli )).
145
- Add ("app_id" , l .AppID ).
146
- Add ("app_name" , l .AppName ).
147
144
Add ("level" , levels [level ])
145
+ for k , v := range l .Fields {
146
+ fields .Add (k , v )
147
+ }
148
148
l .appendEntry (fields )
149
149
150
150
// Dispatch batch
You can’t perform that action at this time.
0 commit comments