blob: f6f08d180f2d34c8fc3dc6def91e1762e4199768 [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301// +build !profile
2
3/*
4* Copyright 2022-present Open Networking Foundation
5* Licensed under the Apache License, Version 2.0 (the "License");
6* you may not use this file except in compliance with the License.
7* You may obtain a copy of the License at
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS,
13* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*
15*
16 */
17
18package pprofcontroller
19
20import (
21 "github.com/opencord/voltha-lib-go/v7/pkg/log"
Tinoj Joseph1d108322022-07-13 10:07:39 +053022 "context"
Naveen Sampath04696f72022-06-13 15:19:14 +053023)
24
25var logger log.CLogger
26var ctx = context.TODO()
27
28// Init to register package
29func Init() {
30 // Setup this package so that it's log level can be modified at run time
31 var err error
32 logger, err = log.RegisterPackage(log.JSON, log.ErrorLevel, log.Fields{})
33 if err != nil {
34 panic(err)
35 }
36 logger.Error(ctx, "Profiling is DISABLED")
37}
38