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