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
@@ -224,10 +224,12 @@ Using `mosquitto.conf` as the example, assume you wish to use your existing file
224
224
225
225
Mosquitto logging is controlled by `mosquitto.conf`. This is the default configuration:
226
226
227
-
```
227
+
```apacheconf
228
228
#log_dest file /mosquitto/log/mosquitto.log
229
229
log_dest stdout
230
230
log_timestamp_format %Y-%m-%dT%H:%M:%S
231
+
# Reduce size and SD-card flash wear, safe to remove if using a SSD
232
+
connection_messages false
231
233
```
232
234
233
235
When `log_dest` is set to `stdout`, you inspect Mosquitto's logs like this:
@@ -236,7 +238,9 @@ When `log_dest` is set to `stdout`, you inspect Mosquitto's logs like this:
236
238
$ docker logs mosquitto
237
239
```
238
240
239
-
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.
241
+
Logs written to `stdout` are stored and persisted to disk as managed by Docker.
242
+
They are kept over reboots, but are lost when your Mosquitto container is
243
+
removed or updated.
240
244
241
245
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