Quick-Python-Print
Quick-Python-Print copied to clipboard
Whether to support loguru logger?
trafficstars
Be deeply grateful!!
To support other print function like loguru logger or logging logger, there are two methods:
- Allow user to define customized print function in extension settings, the default setting is
print, but you can change it tologger.debug. - User defines a alias name for customized print function, here is
print = logger.debug, I tested it, it works:
But this require change the print format, e.g. change print("==>> a: ", a)toprint(f"==>> a: {a}")
Which one do you prefer, I prefer the second method
The version 0.2.0 has adopted the second method, you can give it a try.
Hi, @ioslide , the version 0.3.0 has adopted the first method, you can go to the setting, change the print funtion to logger.debug like: