4

Is there a way to view more than the last 300 lines in the terminal tab on OctoPrint? Or is there a txt file of a log? Or even a setting/plugin that does either?

I keep finding my prints pausing as if I said to change the filament even though that wasn't set in the slicer, but I catch it long after the 300th line in the terminal so I can't see what OctoPrint is trying to do.

0scar
  • 32,029
  • 10
  • 59
  • 135
Lux Claridge
  • 829
  • 2
  • 10
  • 28

2 Answers2

6

Yes, you can show more than 300 lines in the terminal; just disable auto scrolling (reference).

Disabling Autoscroll now completely disables cutting off the lines (so you can have way more than 300 lines while that's disabled), filtering has been improved too and doesn't cause scrolling anymore.

Note that with disabled autoscrolling, you will be able to see more lines up to the point that the buffer is full. If you need even more lines to monitor, just enable the logging the data to file serial.log. If you open the options page (OctoPrint Settings), just tick the box for "Log communication to serial.log" under "Serial logging" of the "Serial connection" options.

This serial logging file is typically used for debug purposes, but as can be read from the options, it comes with a warning:

While this can negatively impact performance, a serial.log can be incredibly useful for debugging any issues observed in the communication between OctoPrint and your printer.

You can either access the log file through the OctoPrint options/setting through the "Logging" options tab, or direct download/copy from the logging directory:

  • on Linux: ~/.octoprint/logs
  • on Windows: %APPDATA%\OctoPrint\logs
  • on MacOSX: ~/Library/Application Support/OctoPrint/logs
0scar
  • 32,029
  • 10
  • 59
  • 135
  • So I would have to disable the auto scrolling at the start of the print and never leave the terminal tab because doing so enables auto scrolling. I also hit the buffer limit at 1500 lines so I don't think this option will be super helpful. – Lux Claridge Jan 23 '19 at 14:09
  • 1
    @LuxClaridge Updated if you even need more lines to monitor. – 0scar Jan 23 '19 at 14:31
  • yep, `serial.log` is your friend more than the terminal. – tedder42 Jan 24 '19 at 22:16
2

Serial logging has to be enabled. Warning: This will impact the performance of OctoPrint. Enabling this feature can be done under Settings -> Serial Connection -> Serial Logging and checking the box for "Log communication to serial.log. OctoPrint Settings

One can download the log under Settings -> Logging and finding serial.log in the list of log files.

The file can also be found in the following directories (according to this FAQ)

All log files that OctoPrint writes can be found in the logs sub folder in its configuration directory:

  • on Linux: ~/.octoprint/logs
  • on Windows: %APPDATA%\OctoPrint\logs
  • on MacOSX: ~/Library/Application Support/OctoPrint/logs
Lux Claridge
  • 829
  • 2
  • 10
  • 28
  • While I was editing the answer to include the serial logging to later see that you also found the answer yourself, very good that you also posted an answer, we need multiple answers if possible! Hope this helps you out debugging your problem, good luck! +1 – 0scar Jan 23 '19 at 14:50
  • @0scar your answer sparked something and I was finally able to google the right phrase. I have it enabled now so time will tell... – Lux Claridge Jan 23 '19 at 14:52