Skip to content

Commit

Permalink
chore: remote log.py (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
halajohn authored Oct 31, 2024
1 parent 0df4238 commit 3cdb2e0
Show file tree
Hide file tree
Showing 24 changed files with 7 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ ten_package("default_async_extension_python") {
"addon.py.tent",
"extension.py",
"extension.py.tent",
"log.py",
"log.py.tent",
"manifest.json",
"manifest.json.tent",
"property.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ten_package("default_async_extension_python") {
"__init__.py",
"addon.py",
"extension.py",
"log.py",
"manifest.json",
"property.json",
"tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ten_package("{{package_name}}") {
"__init__.py",
"addon.py",
"extension.py",
"log.py",
"manifest.json",
"property.json",
"tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
# See the LICENSE file for more information.
#
from . import addon
from .log import logger

logger.info("default_async_extension_python extension loaded")
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
# See the LICENSE file for more information.
#
from . import addon
from .log import logger

logger.info("{{package_name}} extension loaded")
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
TenEnv,
)
from .extension import DefaultAsyncExtension
from .log import logger


@register_addon_as_extension("default_async_extension_python")
class DefaultAsyncExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("DefaultAsyncExtensionAddon on_create_instance")
ten_env.log_info("DefaultAsyncExtensionAddon on_create_instance")
ten_env.on_create_instance_done(DefaultAsyncExtension(name), context)
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ from ten import (
TenEnv,
)
from .extension import {{class_name_prefix}}Extension
from .log import logger


@register_addon_as_extension("{{package_name}}")
class {{class_name_prefix}}ExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("{{class_name_prefix}}ExtensionAddon on_create_instance")
ten_env.log_info("{{class_name_prefix}}ExtensionAddon on_create_instance")
ten_env.on_create_instance_done({{class_name_prefix}}Extension(name), context)
20 changes: 0 additions & 20 deletions packages/core_extensions/default_async_extension_python/log.py

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core_extensions/default_extension_python/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ ten_package("default_extension_python") {
"addon.py.tent",
"extension.py",
"extension.py.tent",
"log.py",
"log.py.tent",
"manifest.json",
"manifest.json.tent",
"property.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ten_package("default_extension_python") {
"__init__.py",
"addon.py",
"extension.py",
"log.py",
"manifest.json",
"property.json",
"tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ten_package("{{package_name}}") {
"__init__.py",
"addon.py",
"extension.py",
"log.py",
"manifest.json",
"property.json",
"tests",
Expand Down
3 changes: 0 additions & 3 deletions packages/core_extensions/default_extension_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
# See the LICENSE file for more information.
#
from . import addon
from .log import logger

logger.info("default_extension_python extension loaded")
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
# See the LICENSE file for more information.
#
from . import addon
from .log import logger

logger.info("{{package_name}} extension loaded")
3 changes: 1 addition & 2 deletions packages/core_extensions/default_extension_python/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
TenEnv,
)
from .extension import DefaultExtension
from .log import logger


@register_addon_as_extension("default_extension_python")
class DefaultExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("DefaultExtensionAddon on_create_instance")
ten_env.log_info("DefaultExtensionAddon on_create_instance")
ten_env.on_create_instance_done(DefaultExtension(name), context)
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ from ten import (
TenEnv,
)
from .extension import {{class_name_prefix}}Extension
from .log import logger


@register_addon_as_extension("{{package_name}}")
class {{class_name_prefix}}ExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("{{class_name_prefix}}ExtensionAddon on_create_instance")
ten_env.log_info("{{class_name_prefix}}ExtensionAddon on_create_instance")
ten_env.on_create_instance_done({{class_name_prefix}}Extension(name), context)
20 changes: 0 additions & 20 deletions packages/core_extensions/default_extension_python/log.py

This file was deleted.

20 changes: 0 additions & 20 deletions packages/core_extensions/default_extension_python/log.py.tent

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from . import addon
from .log import logger

logger.info("I am default extension python")
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ from ten import (
TenEnv,
)
from .extension import DefaultExtension
from .log import logger


@register_addon_as_extension("default_extension_python", __file__)
class DefaultExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("DefaultExtensionAddon on_create_instance")
ten_env.log_info("DefaultExtensionAddon on_create_instance")
ten_env.on_create_instance_done(DefaultExtension(name), context)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
# Refer to the "LICENSE" file in the root directory for more information.
#
from . import addon
from .log import logger

logger.info("default_extension_python extension loaded")
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
TenEnv,
)
from .extension import DefaultExtension
from .log import logger


@register_addon_as_extension("default_extension_python", __file__)
class DefaultExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("DefaultExtensionAddon on_create_instance")
ten_env.log_info("DefaultExtensionAddon on_create_instance")
ten_env.on_create_instance_done(DefaultExtension(name), context)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
# Refer to the "LICENSE" file in the root directory for more information.
#
from . import addon
from .log import logger

logger.info("default_extension_python extension loaded")
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
TenEnv,
)
from .extension import DefaultExtension
from .log import logger


@register_addon_as_extension("default_extension_python")
class DefaultExtensionAddon(Addon):

def on_create_instance(self, ten_env: TenEnv, name: str, context) -> None:
logger.info("DefaultExtensionAddon on_create_instance")
ten_env.log_info("DefaultExtensionAddon on_create_instance")
ten_env.on_create_instance_done(DefaultExtension(name), context)

0 comments on commit 3cdb2e0

Please sign in to comment.