Commit Graph

8 Commits

Author SHA1 Message Date
Kevin O'Connor f1747b5118 klippy: Add Python2 module wrappers and use Python3 module naming
Add wrappers for some common Python modules so that the code can run
on both Python2 and Python3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-10-04 14:36:08 -04:00
Kevin O'Connor b6a25393d3 webhooks: Add client_info parameter to "info" webhook
Allow clients to send their version info to klipper and arrange for
that info to be logged.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-08-26 10:12:58 -04:00
Kevin O'Connor 40da3f406a queuelogger: Use "import Queue as queue" for improved Python3 compatibility
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2020-06-15 17:15:53 -04:00
Kevin O'Connor abf493496c mathutil: Disable queuelogger in background_coordinate_descent()
If the queuelogger was holding the lock when the process is forked
then any attempt to log from the background process would result in a
deadlock.  Attempt a workaround by disabling the queuelogger at the
start of the background process.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2019-12-17 09:51:45 -05:00
Kevin O'Connor bb8926d67a klippy: Automatically clear rollover_info on each restart
Automatically clear the information printed at the start of each log
file rollover on a klippy internal restart.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-04-03 13:18:52 -04:00
Kevin O'Connor 31ca2331d2 queuelogger: Add critical information to each logfile on rollover
When the log file does a rollover, start the top of the log with
critical system information (eg, software versions).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-05-01 14:48:44 -04:00
Kevin O'Connor 839725e3c5 queuelogger: Automatically roll log file
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2017-04-14 09:58:34 -04:00
Kevin O'Connor 1dee1ba64e queuelogger: Add support for background log writing
Writing to the debug log can cause an unbounded delay due to disk IO.
This is particularly so on embedded machines such as the Raspberry Pi
that run on SD cards.  These log writing delays can cause problems for
the main processing threads.

The new "queuelogger" code forwards all the main thread log messages
to a queue, and a background thread writes the log messages from the
queue to the destination file.  This eliminates the IO delay from the
main threads.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-11-12 22:53:43 -05:00