mirror of https://github.com/rclone/rclone
log: fix backtrace not going to the --log-file #9014
Before the log re-organisation in:
8d353039a6 log: add log rotation to --log-file
rclone would write any backtraces to the --log-file which was very
convenient for users.
This got accidentally disabled due to a typo which meant backtraces
started going to stderr even if --log-file was supplied.
This fixes the problem.
This commit is contained in:
parent
4ff8899b2c
commit
4851f1796c
|
|
@ -209,7 +209,7 @@ func InitLogging() {
|
|||
// Log file output
|
||||
if Opt.File != "" {
|
||||
var w io.Writer
|
||||
if Opt.MaxSize == 0 {
|
||||
if Opt.MaxSize < 0 {
|
||||
// No log rotation - just open the file as normal
|
||||
// We'll capture tracebacks like this too.
|
||||
f, err := os.OpenFile(Opt.File, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0640)
|
||||
|
|
|
|||
Loading…
Reference in New Issue