You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Containers/Mosquitto.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,10 +209,12 @@ Using `mosquitto.conf` as the example, assume you wish to use your existing file
209
209
210
210
Mosquitto logging is controlled by `mosquitto.conf`. This is the default configuration:
211
211
212
-
```
212
+
```apacheconf
213
213
#log_dest file /mosquitto/log/mosquitto.log
214
214
log_dest stdout
215
215
log_timestamp_format %Y-%m-%dT%H:%M:%S
216
+
# Reduce size and SD-card flash wear, safe to remove if using a SSD
217
+
connection_messages false
216
218
```
217
219
218
220
When `log_dest` is set to `stdout`, you inspect Mosquitto's logs like this:
@@ -221,7 +223,9 @@ When `log_dest` is set to `stdout`, you inspect Mosquitto's logs like this:
221
223
$ docker logs mosquitto
222
224
```
223
225
224
-
Logs written to `stdout` are ephemeral and will disappear when your Mosquitto container is rebuilt, but this type of configuration reduces wear and tear on your SD card.
226
+
Logs written to `stdout` are stored and persisted to disk as managed by Docker.
227
+
They are kept over reboots, but are lost when your Mosquitto container is
228
+
removed or updated.
225
229
226
230
The alternative, which *may* be more appropriate if you are running on an SSD or HD, is to change `mosquitto.conf` to be like this:
0 commit comments