Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove log.py #219

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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")
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)
Loading