package debug

import (
	"agent/commons/logger"

	"runtime"
	"strconv"
)

var log *logger.Logger

func SetLogger(logger *logger.Logger) {
	log = logger
}

func getCaller(skip int) string {
	_, file, line, ok := runtime.Caller(1 + skip)
	if !ok {
		return "unknown:0"
	}
	return file + ":" + strconv.Itoa(line)
}
