The watchdog-show --tail command is a killer feature, but it lacks having an option to make it print full messages so it can really be useful on some scenarios. The suggested solution is to add an option called --full-message that shows the complete message of each entry.
A patch is being attached in the following comment.
Comments
Comment #1
juampynr commentedThe following patch allows message bodies to be fully printed by adding an option called --full-message to the watchdog-show command.
Comment #2
jonhattanI can't remember why messages are truncated to 188 chars. It seems arbitrary.
What do you think about implementing
--message-length=instead? It could default to 188 and let FALSE be the max length, so it could be invoked aswd-show --message-lengthto get the full length.Comment #3
juampynr commentedI reviewed the patch and came up with a simpler patch. I did not like the new signature of the function that formats the message:
So I replaced the new option --full-message by just --full and reused the existing variable. Now the signature makes much more sense:
Comment #4
juampynr commentedOops. Double posted. Apologies.
Comment #5
moshe weitzman commentedLooks fine. Would be good to enance our unit test coverage for this.
Comment #6
moshe weitzman commentedDecided to just commit this. Does not apply cleanly to 4.x so not committed there.
Comment #7
juampynr commentedHere is a patch for 4.x.
Comment #8
moshe weitzman commentedcommitted to 4.x
Comment #9
juampynr commentedHere is a unit test for watchdog-show and watchdog-delete commands. It is for master branch.
I am also verifying here the --full option.
Comment #10
juampynr commentedAnd here is a test for the 4.x branch.
Comment #11
moshe weitzman commentedCommitted to both branches. Great work!