mirror of
https://github.com/rclone/rclone
synced 2025-01-01 01:06:24 +01:00
Start the logger earlier so all messages go there - fixes #486
This commit is contained in:
parent
a21cc161de
commit
9bbcdeefd0
@ -320,7 +320,6 @@ func ParseFlags() {
|
|||||||
pflag.Usage = syntaxError
|
pflag.Usage = syntaxError
|
||||||
pflag.Parse()
|
pflag.Parse()
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
fs.LoadConfig()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseCommand parses the command from the command line
|
// ParseCommand parses the command from the command line
|
||||||
@ -414,7 +413,12 @@ func main() {
|
|||||||
log.SetOutput(f)
|
log.SetOutput(f)
|
||||||
redirectStderr(f)
|
redirectStderr(f)
|
||||||
}
|
}
|
||||||
fs.Debug("rclone", "Starting with parameters %+v", os.Args)
|
|
||||||
|
// Load the rest of the config now we have started the logger
|
||||||
|
fs.LoadConfig()
|
||||||
|
|
||||||
|
// Write the args for debug purposes
|
||||||
|
fs.Debug("rclone", "Starting with parameters %q", os.Args)
|
||||||
|
|
||||||
// Setup CPU profiling if desired
|
// Setup CPU profiling if desired
|
||||||
if *cpuProfile != "" {
|
if *cpuProfile != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user