diff --git a/.gitignore b/.gitignore index 795afed..17cec73 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,7 @@ __pycache__ dashboards/ compiled/ namespaces/ -www/ \ No newline at end of file +www/ + +build/ +*.egg-info \ No newline at end of file diff --git a/apps/apps.yaml b/apps/apps.yaml index 3062400..492c452 100644 --- a/apps/apps.yaml +++ b/apps/apps.yaml @@ -9,3 +9,9 @@ Bar: Baz: module: my_pkg.my_sub_pkg.baz class: Baz + +Hello: + module: hello + class: HelloWorld + +# Foo: bar \ No newline at end of file diff --git a/apps/apps2.yaml b/apps/apps2.yaml new file mode 100644 index 0000000..128d3da --- /dev/null +++ b/apps/apps2.yaml @@ -0,0 +1,9 @@ +# Baz: +# module: my_pkg.my_sub_pkg.baz +# class: Baz + +Hello2: + module: hello + class: HelloWorld + +# Foo: bar diff --git a/apps/hello.py b/apps/hello.py index 011cb81..2ab2f36 100755 --- a/apps/hello.py +++ b/apps/hello.py @@ -1,7 +1,27 @@ +import logging +import logging.config + import appdaemon.adbase as ad + class HelloWorld(ad.ADBase): def initialize(self): self.adapi = self.get_ad_api() self.log = self.adapi.log self.log(f'Initialized app from {__file__}') + + logging.config.dictConfig( + { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': {'basic': {'style': '{', 'format': '{message}'}}, + 'handlers': {'rich': {'()': 'rich.logging.RichHandler'}}, + 'loggers': { + 'AppDaemon._app_management': { + 'level': 'DEBUG', + 'propagate': False, + 'handlers': ['rich'], + } + }, + } + )