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_OUTPUT 8 select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP 9 help 10 When enabled, backend is using the configured file system to output logs. 11 As the file system must be mounted for the logging to work, it must be 12 either configured for auto-mount or manually mounted by the application. 13 Log messages are discarded as long as the file system is not mounted. 14 15if LOG_BACKEND_FS 16 17backend = FS 18backend-str = fs 19source "subsys/logging/Kconfig.template.log_format_config" 20 21config LOG_BACKEND_FS_AUTOSTART 22 bool "Automatically start fs backend" 23 default y 24 help 25 When enabled automatically start the file system backend on 26 application start. 27 28config LOG_BACKEND_FS_OVERWRITE 29 bool "Old log files overwrite" 30 default y 31 help 32 When enabled backend overwrites oldest log files. 33 In other case, when memory is full, new messages are dropped. 34 35config LOG_BACKEND_FS_FILE_PREFIX 36 string "Log file name prefix" 37 default "log." 38 help 39 User defined name of log files saved in the file system. 40 The prefix is followed by the number of log file. 41 42config LOG_BACKEND_FS_DIR 43 string "Log directory" 44 default "/lfs1" 45 help 46 Directory to which log files will be written. 47 48config LOG_BACKEND_FS_FILE_SIZE 49 int "User defined log file size" 50 default 4096 51 range 128 1073741824 52 help 53 Max log file size (in bytes). 54 55config LOG_BACKEND_FS_FILES_LIMIT 56 int "Max number of files containing logs" 57 default 10 58 help 59 Limit of number of files with logs. It is also limited by 60 size of file system partition. 61 62endif # LOG_BACKEND_FS 63