You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
688 B
Python

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
3 years ago
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!")
3 years ago
pass