Documentation ¶
Index ¶
- Variables
- func GetContainerID()
- func InitializeLogInfo(logLevel string, file_log bool)
- func NewLogger(fileName string) *lumberjack.Logger
- type KubeClient
- type LogConfiguration
- func (lc *LogConfiguration) Audit(activity_functionality int, arg ...interface{})
- func (lc *LogConfiguration) Debug(arg ...interface{})
- func (lc *LogConfiguration) Error(arg ...interface{})
- func (lc *LogConfiguration) Exception(arg ...interface{})
- func (lc *LogConfiguration) Info(arg ...interface{})
- func (lc *LogConfiguration) Warning(arg ...interface{})
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AUDIT_LOG_HEAD = "ACTIVITY_CIM_" LogService = "ACTIVITY_CIM_" AUDIT_LOG_Func = map[int]string{ 1: "ConfigUpdate", } ContainerID string )
More loggers can be added if required For more dynamism it can even be initialized from main.
Functions ¶
func InitializeLogInfo ¶
Types ¶
type KubeClient ¶
type KubeClient struct {
Client *kubernetes.Clientset
}
func NewKubeConfig ¶
func NewKubeConfig() (*KubeClient, error)
NewKubeConfig get k8s client connection
type LogConfiguration ¶
type LogConfiguration struct { StandardOutput bool // true to print o/p on console. by dafault false. No console print LogFile bool // true to print to file. by default false. DateFormat string // date format. Check time package for info TimeFormat string // Time format. Check time package for info TimeLocation string // Time and Date Location. time package ex: Asia/Kolkata Fd *os.File // For file operations PrintException bool // If true exception type will be printed. else not PrintError bool // If true error type will be printed. else not PrintWarning bool // If true Warning type will be printed. else not PrintInfo bool // If true Info type will be printed. else not PrintDebug bool // If true Debug type will be printed. else not }
var LogConf LogConfiguration
func (*LogConfiguration) Audit ¶
func (lc *LogConfiguration) Audit(activity_functionality int, arg ...interface{})
func (*LogConfiguration) Debug ¶
func (lc *LogConfiguration) Debug(arg ...interface{})
func (*LogConfiguration) Error ¶
func (lc *LogConfiguration) Error(arg ...interface{})
func (*LogConfiguration) Exception ¶
func (lc *LogConfiguration) Exception(arg ...interface{})
func (*LogConfiguration) Info ¶
func (lc *LogConfiguration) Info(arg ...interface{})
func (*LogConfiguration) Warning ¶
func (lc *LogConfiguration) Warning(arg ...interface{})
Click to show internal directories.
Click to hide internal directories.