natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.76k stars 585 forks source link

Allow active log file to be located in a separated directory #152

Open Sauci opened 2 years ago

Sauci commented 2 years ago

In some case (i.e. embedded software applications), write operations to the flash might be an issue. Thus, it would make sense to add an additional parameter to the Logger structure (I would propose BackupDirectory), which specifies where the old log files should be stored. In this way, the active log file path can point to a RAM location of the file system (e.g. /var/log/... on Linux), while the backup directory can point to a flash location.