Extend M929 logging capabilities



  • In order to run a Z-probe repeatability test (check my other post), I was hoping to be able to store the results in a .txt file. But the file only contained things like

    19:26:53: Connection established!
    19:26:53: Disconnected.
    19:04:39: Message Log cleared!
    

    I expected to see the same messages as in the DWC gcode console. It appears that only very high-level events are being recorded.

    Then I thought that with debugging M111 Sx enabled, some of the output I see in the console is logged to the file.

    So my feature request is:

    Extend M929 with

    • C0 (default) / C1 : disable / enable logging for all content from the console
    • D0-14:
      a. enable debugging: M111 S1 P[D value]
      b. disable (0) / enable (1-14) logging of the debugging infos as set
      c. use D3:4:12 (see M111 extension below)
    • S0 : stop logging and reset C and D parameter
    • M0 / M1 / M2 : write mode. M0 overwrite, M1 append to existing, M2 create new file with suffix _[date time]

    Extend M111 P in order to be able to

    • use P1:3:12 to enable (S1) or disable (S0) the debugging options in bulk mode

    @dc42 sorry to keep posting more extra wishes. But since I'm new to RepRapFW and about to tune my printer as good as possible, I keep finding stuff for Xmas list (tool changing and runout sensors are next, then laser setup). Hope you don't mind 🙃



  • On newer versions of the DWC there is a button on the Gcode console to download the entire log as a txt or csv file. Does that satisfy what you're after?



  • @phaedrux said in Extend M929 logging capabilities:

    On newer versions of the DWC there is a button on the Gcode console to download the entire log as a txt or csv file. Does that satisfy what you're after?

    Nope. That's what I ended up doing. But I would love to be able to run a few automated test at night, collect the data and then analyse the results. As a former software tester, I would love to be able to automate some tests. Plus, it should be fairly easy to implement - at least the M929 C1


  • administrators

    What values in particular would you like logged? It may make sense to log some other values automatically, for example the results of delta calibration or mesh bed probing. Or perhaps to log all non-trivial responses whenever the printer is printing from SD card.



  • @dc42

    While

    C0 (default) / C1 : disable / enable logging for all content from the console

    would log everything that is sent to the DWC console (just like the button on the GCode console to download the entire log)

    D0-14:
    a. enable debugging: M111 S1 P[D value]
    b. disable (0) / enable (1-14) logging of the debugging infos as set
    c. use D3:4:12 (see M111 extension below)

    would add more info to the log according to the state of M111 (or is the debug info exclusive to a USB connection?)
    EDIT: Debug output goes only to USB. Is that still valid?

    Meshbed probing is already nicely covered by DWC, but if it comes at little additional effort, that would be helping in the log as well. Again, logs are essential for any kind of testing....


  • administrators

    @dc42 having everything that goes to the console in the log (when configured to do so) + every debug output (when similarly configured) would be the best option. At all times as well not just when printing from SD. As long as there is sufficient bandwidth to write to the SD at the same time as reading. may need a RAM buffer.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.