1# Copyright (c) 2021 Nordic Semiconductor ASA 2# SPDX-License-Identifier: Apache-2.0 3 4config LOG_BACKEND_FS 5 bool "File system backend" 6 depends on FILE_SYSTEM 7 select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP 8 help 9 When enabled, backend is using the configured file system to output logs. 10 As the file system must be mounted for the logging to work, it must be 11 either configured for auto-mount or manually mounted by the application. 12 Log messages are discarded as long as the file system is not mounted. 13 14if LOG_BACKEND_FS 15 16backend = FS 17backend-str = fs 18source "subsys/logging/Kconfig.template.log_format_config" 19 20config LOG_BACKEND_FS_AUTOSTART 21 bool "Automatically start fs backend" 22 default y 23 help 24 When enabled automatically start the file system backend on 25 application start. 26 27config LOG_BACKEND_FS_OVERWRITE 28 bool "Old log files overwrite" 29 default y 30 help 31 When enabled backend overwrites oldest log files. 32 In other case, when memory is full, new messages are dropped. 33 34config LOG_BACKEND_FS_APPEND_TO_NEWEST_FILE 35 bool "Append to the newest log file" 36 default y 37 help 38 When enabled and when there is space left in the newest log file, 39 backend appends to it. 40 When disabled backend creates a new log file on every startup. 41 42config LOG_BACKEND_FS_FILE_PREFIX 43 string "Log file name prefix" 44 default "log." 45 help 46 User defined name of log files saved in the file system. 47 The prefix is followed by the number of log file. 48 49config LOG_BACKEND_FS_DIR 50 string "Log directory" 51 default "/lfs1" 52 help 53 Directory to which log files will be written. 54 55config LOG_BACKEND_FS_FILE_SIZE 56 int "User defined log file size" 57 default 4096 58 range 128 1073741824 59 help 60 Max log file size (in bytes). 61 62config LOG_BACKEND_FS_FILES_LIMIT 63 int "Max number of files containing logs" 64 default 10 65 help 66 Limit of number of files with logs. It is also limited by 67 size of file system partition. 68 69endif # LOG_BACKEND_FS 70