Skip to content

Commit

Permalink
fix for ci
Browse files Browse the repository at this point in the history
* add copyright
* remove unused function
  • Loading branch information
chenyarong committed Dec 28, 2023
1 parent 46f59d4 commit 5df3f54
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkg/logger/hub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright (c) 2017, MegaEase
* All rights reserved.
*
* 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 (
Expand Down Expand Up @@ -29,13 +46,6 @@ func (lh *logHub) register(name string, logger *zap.SugaredLogger) {
lh.loggers[name] = logger
}

func (lh *logHub) unregister(name string) {
lh.mu.Lock()
defer lh.mu.Unlock()

delete(lh.loggers, name)
}

// sync syncs all loggers.
func (lh *logHub) sync() {
lh.mu.RLock()
Expand Down
17 changes: 17 additions & 0 deletions pkg/logger/logger_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright (c) 2017, MegaEase
* All rights reserved.
*
* 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 (
Expand Down

0 comments on commit 5df3f54

Please sign in to comment.