You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
792 B
Go

/*
* Copyright (C) 2019 Philipp Haefelfinger (http://www.haefelfinger.ch/). All Rights Reserved.
* This application is licensed under GPLv2. See the LICENSE file in the root directory of the project.
*/
package main
import (
"flag"
"git.haefelfinger.net/philipp.haefelfinger/SideCarJpegCleaner/internal/app"
"github.com/sirupsen/logrus"
"os"
)
var (
logLevel = flag.String("logLevel", "info", "The minimum log level required to write out a log message. (panic,fatal,error,warn,info,debug,trace)")
)
func main() {
app.InitializeFlags()
initializeLog()
logrus.Infoln("Starting jpeg cleaner...")
app.Run()
}
func initializeLog() {
level, err := logrus.ParseLevel(*logLevel)
if err != nil {
level = logrus.DebugLevel
}
logrus.SetLevel(level)
logrus.SetOutput(os.Stdout)
}