diff --git a/console_formatter.go b/console_formatter.go index f4eee07..5a5bb6d 100644 --- a/console_formatter.go +++ b/console_formatter.go @@ -1,3 +1,17 @@ +// Copyright 2020 The ZKits Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package logger import ( diff --git a/console_formatter_caller_test.go b/console_formatter_caller_test.go index d6dfb68..75fc599 100644 --- a/console_formatter_caller_test.go +++ b/console_formatter_caller_test.go @@ -1,3 +1,17 @@ +// Copyright 2020 The ZKits Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package logger import ( @@ -14,9 +28,9 @@ func TestConsoleFormatter_Format_WithoutCaller(t *testing.T) { buf := new(bytes.Buffer) l.SetOutput(buf) - l.WithField("foo", 1).WithCaller().Trace("test") // LINE 17 + l.WithField("foo", 1).WithCaller().Trace("test") // LINE 31 fmt.Println(buf.String()) - want := "[TIME][\u001B[36mTAC\u001B[0m] test console_formatter_caller_test.go:17 foo=1\n" + want := "[TIME][\u001B[36mTAC\u001B[0m] test console_formatter_caller_test.go:31 foo=1\n" if want != buf.String() { t.Fatalf("NewConsoleFormatter().Format(): %s", strconv.Quote(buf.String())) } diff --git a/console_formatter_test.go b/console_formatter_test.go index cf919fd..5a09af6 100644 --- a/console_formatter_test.go +++ b/console_formatter_test.go @@ -1,3 +1,17 @@ +// Copyright 2020 The ZKits Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package logger import ( diff --git a/multi_writer.go b/multi_writer.go index cd02679..94ea0fe 100644 --- a/multi_writer.go +++ b/multi_writer.go @@ -1,3 +1,17 @@ +// Copyright 2020 The ZKits Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package logger import ( diff --git a/multi_writer_test.go b/multi_writer_test.go index d70a980..211c4e8 100644 --- a/multi_writer_test.go +++ b/multi_writer_test.go @@ -1,3 +1,17 @@ +// Copyright 2020 The ZKits Project Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package logger import (