[skip ci]Fix golint error in logutil (#9743)

Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
zhenshan.cao 2021-10-12 19:52:43 +08:00 committed by GitHub
parent 0acb9edf19
commit c39bec7bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@
// 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 logutil
import (
@ -110,6 +111,7 @@ func init() {
})
}
// SetupLogger is used to initialize the log with config.
func SetupLogger(cfg *log.Config) {
once.Do(func() {
// initialize logger
@ -135,6 +137,7 @@ func SetupLogger(cfg *log.Config) {
})
}
// GetZapWrapper returns the stored zapWrapper object.
func GetZapWrapper() *zapWrapper {
return _globalZapWrapper.Load().(*zapWrapper)
}