File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
configuration/contrib/diag-plugins
tests/RobotFramework/tests/tedge/diag Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ mosquitto_journal() {
3434
3535mosquitto_log () {
3636 if [ -f /var/log/mosquitto/mosquitto.log ]; then
37- cp /var/log/mosquitto/mosquitto.log " $OUTPUT_DIR " /
37+ # avoid copying the full file as it could be very large if logrotate is not installed and configured
38+ # but still log the details as it could be helpful to diagnose
39+ echo " mosquitto log file details:" >&2
40+ ls -l /var/log/mosquitto/mosquitto.log >&2 || :
41+ tail -n 1000 /var/log/mosquitto/mosquitto.log > " $OUTPUT_DIR " /mosquitto.log || :
3842 else
3943 echo " mosquitto.log not found" >&2
4044 fi
Original file line number Diff line number Diff line change @@ -73,8 +73,11 @@ Test Tags theme:troubleshooting theme:cli theme:plugins
7373 FOR ${log_name } IN @{log_names }
7474 File Size Is Not Zero ${log_name }
7575 END
76+ ${log_line_count } = Execute Command
77+ ... cmd=wc -l /results/test/07_mosquitto/mosquitto.log | awk '{print $1}'
78+ ... strip=${True }
79+ Should Be True int(${log_line_count } ) <= 1000
7680 Execute Command diff /var/log/mosquitto/mosquitto.log /results/test/07_mosquitto/mosquitto.log
77- Log Should Contain mosquitto-journal.log Starting mosquitto.service
7881
7982
8083*** Keywords ***
You can’t perform that action at this time.
0 commit comments