Add a logger prefix
This commit is contained in:
parent
c0c6762313
commit
85cbab1d70
@ -31,6 +31,8 @@ func main() {
|
||||
flag.StringVar(&CloudPassword, "cloudpass", "", "Password used to sync")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[admin] ")
|
||||
|
||||
var staticDir string
|
||||
var err error
|
||||
log.Println("Checking paths...")
|
||||
|
@ -48,6 +48,8 @@ func main() {
|
||||
var skipFullGeneration = flag.Bool("skipFullGeneration", false, "Skip initial full generation (safe to skip after start)")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[backend] ")
|
||||
|
||||
SubmissionDir = path.Clean(SubmissionDir)
|
||||
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
|
@ -37,6 +37,8 @@ func main() {
|
||||
flag.StringVar(&SubmissionDir, "submission", "./submissions/", "Base directory where save submissions")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[frontend] ")
|
||||
|
||||
log.Println("Creating submission directory...")
|
||||
if _, err := os.Stat(SubmissionDir); os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(SubmissionDir, 0777); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user