diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2022-08-24 18:06:26 -0700 |
|---|---|---|
| committer | TrainDoctor <traindoctor@protonmail.com> | 2022-08-24 18:06:26 -0700 |
| commit | 4fcd72fd1b17ce9df4db279507ccd47328f03925 (patch) | |
| tree | 7c30d4e87054cd1c1468991a136235afa2e43c3c | |
| parent | 2c0988f3c111d078608450048b409f367210eb45 (diff) | |
| download | decky-bazzite-buddy-4fcd72fd1b17ce9df4db279507ccd47328f03925.tar.gz decky-bazzite-buddy-4fcd72fd1b17ce9df4db279507ccd47328f03925.zip | |
Added basic logging config
| -rw-r--r-- | main.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,9 +1,18 @@ +import logging + +logging.basicConfig(filename="/tmp/template.log", + format='[Template] %(asctime)s %(levelname)s %(message)s', + filemode='w+', + force=True) +logger=logging.getLogger() +logger.setLevel(logging.INFO) # can be changed to logging.DEBUG for debugging issues + class Plugin: # A normal method. It can be called from JavaScript using call_plugin_function("method_1", argument1, argument2) async def add(self, left, right): return left + right - # Asyncio-compatible long-running code, executed in a task when the plugin is loaded async def _main(self): + logger.info("Hello World!") pass |
