c_suppress_logs.cfg modified - 19/04/25 - 13:22:43

This commit is contained in:
pi committed 2025-04-19 13:22:46 +10:00
1 parent 36777a7a0f
commit b275efb68f
1 file changed
+56 -32
+56 -32
View File
@@ -1,34 +1,58 @@
[suppress_logs] [suppress_logs]
##################################################################### ########################################################################################################
# 🧰 SUPPRESS_LOGS MODULE USAGE GUIDE # # 🧰 SUPPRESS_LOGS MODULE — USAGE GUIDE #
# # # #
# This module lets you temporarily hide log messages from Klipper # # This module lets you hide specific log lines from Klipper's logs using pattern matching — #
# that match specific text patterns — useful for things like # # especially useful to suppress repeated output from commands like SET_TMC_CURRENT. #
# SET_TMC_CURRENT spam. # # #
# # # ✅ Basic Setup: #
# To install: # # 1. Install suppress_logs.py in: #
# - Save `suppress_logs.py` to: # # /home/pi/klipper/klippy/extras/suppress_logs.py #
# /home/pi/klipper/klippy/extras/suppress_logs.py # # 2. Add this to your printer.cfg: #
# - Add the section [suppress_logs] to printer.cfg # # [suppress_logs] #
# - Restart Klipper # # 3. Restart Klipper #
# # # #
# To use: # # ✅ Usage: #
# ENABLE_LOG_SUPPRESSION KEYWORDS="YourPattern1|YourPattern2" # # ENABLE_LOG_SUPPRESSION KEYWORDS="pattern1|pattern2" #
# ... your commands here ... # # ... your commands here ... #
# DISABLE_LOG_SUPPRESSION # # DISABLE_LOG_SUPPRESSION #
# # # #
# EXAMPLE: Suppress TMC Current Messages # # ⚠️ KEYWORDS must be quoted! #
# # # #
# ENABLE_LOG_SUPPRESSION KEYWORDS="Run Current|Hold Current" # # ✅ Patterns are full Python regex #
# SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.89 HOLD_CURRENT=0.65# # You can use wildcards and partial matches like these: #
# DISABLE_LOG_SUPPRESSION # # #
# # # ➤ Match both TMC messages: #
# NOTES: # # ENABLE_LOG_SUPPRESSION KEYWORDS="Run Current:.*|Hold Current:.*" #
# • KEYWORDS must be quoted if they contain spaces or symbols # # #
# • You can use regex patterns if needed # # ➤ Match any line that contains 'Current': #
# • This does NOT remove logs entirely — just prevents matching # # ENABLE_LOG_SUPPRESSION KEYWORDS=".*Current:.*" #
# lines from being printed to the Klipper log output # # #
# • This is silent — no console messages are shown when used # # ➤ Match lines starting with 'Run Current': #
# # # ENABLE_LOG_SUPPRESSION KEYWORDS="^Run Current:" #
##################################################################### # #
# ➤ Match anything ending in A (Amps): #
# ENABLE_LOG_SUPPRESSION KEYWORDS=".*A$" #
# #
# ✅ Example Macro: #
# #
# [gcode_macro QUIET_CURRENT_SET] #
# description: Set stepper current without TMC spam #
# gcode: #
# ENABLE_LOG_SUPPRESSION KEYWORDS="Run Current:.*|Hold Current:.*" #
# SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.89 HOLD_CURRENT=0.65 #
# DISABLE_LOG_SUPPRESSION #
# #
# This prevents the log line like: #
# Run Current: 0.89A Hold Current: 0.65A #
# from appearing in your klippy.log #
# #
# ✅ Notes: #
# - No output will appear in the console — this runs silently #
# - You can stack multiple patterns using `|` #
# - Regex is case-sensitive unless written to ignore it #
# #
# 🔄 Disable with: #
# DISABLE_LOG_SUPPRESSION #
########################################################################################################