File tree 5 files changed +72
-2
lines changed
5 files changed +72
-2
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The ZKits Project Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package logger
2
16
3
17
import (
Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The ZKits Project Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package logger
2
16
3
17
import (
@@ -14,9 +28,9 @@ func TestConsoleFormatter_Format_WithoutCaller(t *testing.T) {
14
28
buf := new (bytes.Buffer )
15
29
l .SetOutput (buf )
16
30
17
- l .WithField ("foo" , 1 ).WithCaller ().Trace ("test" ) // LINE 17
31
+ l .WithField ("foo" , 1 ).WithCaller ().Trace ("test" ) // LINE 31
18
32
fmt .Println (buf .String ())
19
- want := "[TIME][\u001B [36mTAC\u001B [0m] test console_formatter_caller_test.go:17 foo=1\n "
33
+ want := "[TIME][\u001B [36mTAC\u001B [0m] test console_formatter_caller_test.go:31 foo=1\n "
20
34
if want != buf .String () {
21
35
t .Fatalf ("NewConsoleFormatter().Format(): %s" , strconv .Quote (buf .String ()))
22
36
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The ZKits Project Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package logger
2
16
3
17
import (
Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The ZKits Project Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package logger
2
16
3
17
import (
Original file line number Diff line number Diff line change
1
+ // Copyright 2020 The ZKits Project Authors.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
1
15
package logger
2
16
3
17
import (
You can’t perform that action at this time.
0 commit comments