common.go
423 字节
package constant
import "os"
const SERVICE_NAME = "allied-creation-cooperation"
var LOG_LEVEL = "debug"
var LOG_FILE = "app.log"
var LOG_PREFIX = "[allied-creation-cooperation]"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
if os.Getenv("LOG_FILE") != "" {
LOG_FILE = os.Getenv("LOG_FILE")
}
if os.Getenv("LOG_PREFIX") != "" {
LOG_PREFIX = os.Getenv("LOG_PREFIX")
}
}