wwdok / Quick-Python-Print

A vscode extension to quickly handle print operations ,like print variable value, variable attribute, funciton of variable etc by using shortcuts
https://marketplace.visualstudio.com/items?itemName=WeidaWang.quick-python-print
17 stars 3 forks source link

Whether to support loguru logger? #2

Open ioslide opened 1 year ago

ioslide commented 1 year ago

Be deeply grateful!!

wwdok commented 1 year ago

To support other print function like loguru logger or logging logger, there are two methods:

  1. Allow user to define customized print function in extension settings, the default setting is print, but you can change it to logger.debug.
  2. User defines a alias name for customized print function, here is print = logger.debug, I tested it, it works: image But this require change the print format, e.g. change print("==>> a: ", a) to print(f"==>> a: {a}")

Which one do you prefer, I prefer the second method

wwdok commented 1 year ago

The version 0.2.0 has adopted the second method, you can give it a try.

wwdok commented 11 months ago

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: image