func getLogLevel() string {
	logLevel, ok := log.LogLevelFromString(os.Getenv(envLogLevel))
	if !ok {
		logLevel = log.InfoLvl
	}
	return logLevel.String()
}
GetLogLevel returns the effective log level.
package logger
import (
	"fmt"
	"os"
	log "github.com/cihub/seelog"
)
const (
	envLogLevel    = "VPC_CNI_LOG_LEVEL"
	envLogFilePath = "VPC_CNI_LOG_FILE"
	logConfigFormat = `
<seelog type="asyncloop" minlevel="%s">
 <outputs formatid="main">
  <rollingfile filename="%s" type="date" datepattern="2006-01-02-15" archivetype="none" maxrolls="24" />
 </outputs>
 <formats>
  <format id="main" format="%%UTCDate(2006-01-02T15:04:05Z07:00) [%%LEVEL] %%Msg%%n" />
 </formats>
</seelog>
`
)
func Setup(logFilePath string) {
	config := fmt.Sprintf(logConfigFormat, getLogLevel(), getLogFilePath(logFilePath))
	logger, err := log.LoggerFromConfigAsString(config)
	if err != nil {
		fmt.Println("Failed to setup logger: ", err)
		return
	}
	log.ReplaceLogger(logger)
}