Files
rclone/fs
Sven Rebhan b8b3346499 log: fix side effects when importing rclone as a library
Avoid side effects by using own logger instance

- Importing fs/log only sets rclone's private logger via fs.SetLogger,
  so internal rclone logging works from the moment the package is
  imported but the process-wide slog default is left untouched.

- slog.SetDefault and slog.SetLogLoggerLevel move into InitLogging,
  which is called explicitly from the CLI (cmd/cmd.go), the librclone
  wrapper and the integration test framework. So rclone-as-a-program
  keeps capturing log.Print/log.Fatal and slog.Default() output as
  before.

Library consumers that import fs/log without calling InitLogging now
keep their own slog default and can safely route rclone output back
into it via log.Handler.SetOutput without recursing.

Fixes #8907

Co-authored-by: Nick Craig-Wood <nick@craig-wood.com>
2026-05-04 11:06:30 +01:00
..
2025-02-28 11:31:14 +00:00
2025-02-28 11:31:14 +00:00
2025-09-15 12:45:57 +01:00
2025-10-21 18:56:06 +01:00
2025-10-21 18:56:06 +01:00
2025-02-28 11:31:14 +00:00
2023-10-23 15:43:55 +01:00
2018-08-21 10:58:59 +01:00
2025-11-03 14:44:39 +00:00
2026-04-24 17:20:18 +01:00
2026-05-01 17:15:20 +01:00