orionis 0.452.0__py3-none-any.whl → 0.454.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/console/commands/version.py +30 -2
- orionis/console/core/reactor.py +64 -5
- orionis/foundation/application.py +2 -2
- orionis/foundation/providers/logger_provider.py +7 -7
- orionis/metadata/framework.py +1 -1
- orionis/services/log/contracts/log_service.py +1 -1
- orionis/services/log/log_service.py +3 -3
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/METADATA +1 -1
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/RECORD +14 -14
- tests/services/log/test_log.py +10 -10
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/WHEEL +0 -0
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/top_level.txt +0 -0
- {orionis-0.452.0.dist-info → orionis-0.454.0.dist-info}/zip-safe +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from orionis.console.base.command import BaseCommand
|
|
2
2
|
from orionis.console.exceptions import CLIOrionisRuntimeError
|
|
3
|
-
from
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.panel import Panel
|
|
5
|
+
from orionis.metadata import framework
|
|
4
6
|
|
|
5
7
|
class VersionCommand(BaseCommand):
|
|
6
8
|
"""
|
|
@@ -8,6 +10,7 @@ class VersionCommand(BaseCommand):
|
|
|
8
10
|
|
|
9
11
|
This command prints the version number of the framework in use.
|
|
10
12
|
"""
|
|
13
|
+
timestamps: bool = False
|
|
11
14
|
|
|
12
15
|
signature: str = "version"
|
|
13
16
|
|
|
@@ -39,7 +42,32 @@ class VersionCommand(BaseCommand):
|
|
|
39
42
|
|
|
40
43
|
# Print the Orionis framework version in a bold, success style
|
|
41
44
|
try:
|
|
42
|
-
|
|
45
|
+
|
|
46
|
+
# Initialize the console for rich output
|
|
47
|
+
console = Console()
|
|
48
|
+
|
|
49
|
+
# Compose the main info
|
|
50
|
+
title = f"[bold yellow]{framework.NAME.capitalize()} Framework[/bold yellow] [white]v{framework.VERSION}[/white]"
|
|
51
|
+
author = f"[bold]Author:[/bold] {framework.AUTHOR} | [bold]Email:[/bold] {framework.AUTHOR_EMAIL}"
|
|
52
|
+
desc = f"[italic]{framework.DESCRIPTION}[/italic]"
|
|
53
|
+
python_req = f"[bold]Python Requires:[/bold] {framework.PYTHON_REQUIRES}"
|
|
54
|
+
docs = f"[bold]Docs:[/bold] [underline blue]{framework.DOCS}[/underline blue]"
|
|
55
|
+
repo = f"[bold]Repo:[/bold] [underline blue]{framework.FRAMEWORK}[/underline blue]"
|
|
56
|
+
|
|
57
|
+
body = "\n".join([desc, "", author, python_req, docs, repo, ""])
|
|
58
|
+
|
|
59
|
+
panel = Panel(
|
|
60
|
+
body,
|
|
61
|
+
title=title,
|
|
62
|
+
border_style="bold yellow",
|
|
63
|
+
padding=(1, 6),
|
|
64
|
+
expand=False,
|
|
65
|
+
subtitle="[bold yellow]Orionis CLI[/bold yellow]",
|
|
66
|
+
subtitle_align="right"
|
|
67
|
+
)
|
|
68
|
+
console.line()
|
|
69
|
+
console.print(panel)
|
|
70
|
+
console.line()
|
|
43
71
|
|
|
44
72
|
# Raise a custom runtime error if any exception occurs
|
|
45
73
|
except Exception as e:
|
orionis/console/core/reactor.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
import os
|
|
3
|
-
|
|
3
|
+
import re
|
|
4
4
|
import time
|
|
5
|
+
from pathlib import Path
|
|
5
6
|
from typing import List, Optional
|
|
6
7
|
from orionis.app import Orionis
|
|
7
8
|
from orionis.console.args.argument import CLIArgument
|
|
@@ -11,7 +12,7 @@ from orionis.console.output.contracts.console import IConsole
|
|
|
11
12
|
from orionis.console.output.contracts.executor import IExecutor
|
|
12
13
|
from orionis.foundation.contracts.application import IApplication
|
|
13
14
|
from orionis.services.introspection.modules.reflection import ReflectionModule
|
|
14
|
-
import
|
|
15
|
+
from orionis.services.log.contracts.log_service import ILogger
|
|
15
16
|
|
|
16
17
|
class Reactor:
|
|
17
18
|
|
|
@@ -63,12 +64,64 @@ class Reactor:
|
|
|
63
64
|
# Automatically discover and load command classes from the console commands directory
|
|
64
65
|
self.__loadCommands(str(self.__app.path('console_commands')), self.__root)
|
|
65
66
|
|
|
67
|
+
# Load core command classes provided by the Orionis framework
|
|
68
|
+
self.__loadCoreCommands()
|
|
69
|
+
|
|
66
70
|
# Initialize the executor for command output management
|
|
67
71
|
self.__executer: IExecutor = self.__app.make('x-orionis.console.output.executor')
|
|
68
72
|
|
|
69
73
|
# Initialize the console for command output
|
|
70
74
|
self.__console: IConsole = self.__app.make('x-orionis.console.output.console')
|
|
71
75
|
|
|
76
|
+
# Initialize the logger service for logging command execution details
|
|
77
|
+
self.__logger: ILogger = self.__app.make('x-orionis.services.log.log_service')
|
|
78
|
+
|
|
79
|
+
def __loadCoreCommands(self) -> None:
|
|
80
|
+
"""
|
|
81
|
+
Loads and registers core command classes provided by the Orionis framework.
|
|
82
|
+
|
|
83
|
+
This method is responsible for discovering and registering core command classes
|
|
84
|
+
that are bundled with the Orionis framework itself (such as version, help, etc.).
|
|
85
|
+
These commands are essential for the framework's operation and are made available
|
|
86
|
+
to the command registry so they can be executed like any other user-defined command.
|
|
87
|
+
|
|
88
|
+
The method imports the required core command classes, validates their structure,
|
|
89
|
+
and registers them in the internal command registry. Each command is checked for
|
|
90
|
+
required attributes such as `timestamps`, `signature`, `description`, and `arguments`
|
|
91
|
+
to ensure proper integration and discoverability.
|
|
92
|
+
|
|
93
|
+
Returns
|
|
94
|
+
-------
|
|
95
|
+
None
|
|
96
|
+
This method does not return any value. All discovered core commands are
|
|
97
|
+
registered internally in the reactor's command registry for later lookup
|
|
98
|
+
and execution.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
# Import the core command class for version
|
|
102
|
+
from orionis.console.commands.version import VersionCommand
|
|
103
|
+
|
|
104
|
+
# List of core command classes to load (extend this list as more core commands are added)
|
|
105
|
+
core_commands = [VersionCommand]
|
|
106
|
+
|
|
107
|
+
# Iterate through the core command classes and register them
|
|
108
|
+
for obj in core_commands:
|
|
109
|
+
|
|
110
|
+
# Validate and extract required command attributes
|
|
111
|
+
timestamp = self.__ensureTimestamps(obj)
|
|
112
|
+
signature = self.__ensureSignature(obj)
|
|
113
|
+
description = self.__ensureDescription(obj)
|
|
114
|
+
args = self.__ensureArguments(obj)
|
|
115
|
+
|
|
116
|
+
# Register the command in the internal registry with all its metadata
|
|
117
|
+
self.__commands[signature] = {
|
|
118
|
+
"class": obj,
|
|
119
|
+
"timestamps": timestamp,
|
|
120
|
+
"signature": signature,
|
|
121
|
+
"description": description,
|
|
122
|
+
"args": args
|
|
123
|
+
}
|
|
124
|
+
|
|
72
125
|
def __loadCommands(self, commands_path: str, root_path: str) -> None:
|
|
73
126
|
"""
|
|
74
127
|
Loads command classes from Python files in the specified commands directory.
|
|
@@ -418,10 +471,13 @@ class Reactor:
|
|
|
418
471
|
output = self.__app.call(command_instance, 'handle')
|
|
419
472
|
|
|
420
473
|
# Log the command execution completion with DONE state
|
|
474
|
+
elapsed_time = round(time.perf_counter() - start_time, 2)
|
|
421
475
|
if timestamps:
|
|
422
|
-
elapsed_time = round(time.perf_counter() - start_time, 2)
|
|
423
476
|
self.__executer.done(program=signature, time=f"{elapsed_time}s")
|
|
424
477
|
|
|
478
|
+
# Log the command execution success
|
|
479
|
+
self.__logger.info(f"Command '{signature}' executed successfully in ({elapsed_time}) seconds.")
|
|
480
|
+
|
|
425
481
|
# If the command has a return value or output, return it
|
|
426
482
|
if output is not None:
|
|
427
483
|
return output
|
|
@@ -431,7 +487,10 @@ class Reactor:
|
|
|
431
487
|
# Display the error message in the console
|
|
432
488
|
self.__console.error(f"An error occurred while executing command '{signature}': {e}", timestamp=False)
|
|
433
489
|
|
|
490
|
+
# Log the error in the logger service
|
|
491
|
+
self.__logger.error(f"Command '{signature}' execution failed: {e}")
|
|
492
|
+
|
|
434
493
|
# Log the command execution failure with ERROR state
|
|
494
|
+
elapsed_time = round(time.perf_counter() - start_time, 2)
|
|
435
495
|
if timestamps:
|
|
436
|
-
|
|
437
|
-
self.__executer.fail(program=signature, time=f"{elapsed_time}s")
|
|
496
|
+
self.__executer.fail(program=signature, time=f"{elapsed_time}s")
|
|
@@ -20,7 +20,7 @@ from orionis.foundation.config.testing.entities.testing import Testing
|
|
|
20
20
|
from orionis.foundation.contracts.application import IApplication
|
|
21
21
|
from orionis.foundation.exceptions import OrionisTypeError, OrionisRuntimeError, OrionisValueError
|
|
22
22
|
from orionis.foundation.providers.logger_provider import LoggerProvider
|
|
23
|
-
from orionis.services.log.contracts.log_service import
|
|
23
|
+
from orionis.services.log.contracts.log_service import ILogger
|
|
24
24
|
|
|
25
25
|
class Application(Container, IApplication):
|
|
26
26
|
"""
|
|
@@ -1931,7 +1931,7 @@ class Application(Container, IApplication):
|
|
|
1931
1931
|
self.__loadFrameworksKernel()
|
|
1932
1932
|
|
|
1933
1933
|
# Retrieve logger and console instances from the container
|
|
1934
|
-
logger:
|
|
1934
|
+
logger: ILogger = self.make('x-orionis.services.log.log_service')
|
|
1935
1935
|
|
|
1936
1936
|
# Calculate elapsed time in milliseconds since application start
|
|
1937
1937
|
elapsed_ms = (time.time_ns() - self.startAt) // 1_000_000
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from orionis.container.providers.service_provider import ServiceProvider
|
|
2
|
-
from orionis.services.log.contracts.log_service import
|
|
3
|
-
from orionis.services.log.log_service import
|
|
2
|
+
from orionis.services.log.contracts.log_service import ILogger
|
|
3
|
+
from orionis.services.log.log_service import Logger
|
|
4
4
|
|
|
5
5
|
class LoggerProvider(ServiceProvider):
|
|
6
6
|
"""
|
|
@@ -8,7 +8,7 @@ class LoggerProvider(ServiceProvider):
|
|
|
8
8
|
|
|
9
9
|
The LoggerProvider is responsible for registering and configuring the logging
|
|
10
10
|
service implementation in the application's dependency injection container.
|
|
11
|
-
It binds the concrete
|
|
11
|
+
It binds the concrete Logger to the ILogger interface, enabling
|
|
12
12
|
application-wide access to structured logging capabilities.
|
|
13
13
|
|
|
14
14
|
This provider handles the initialization of the logging service with the
|
|
@@ -32,7 +32,7 @@ class LoggerProvider(ServiceProvider):
|
|
|
32
32
|
"""
|
|
33
33
|
Register the logging service in the application container.
|
|
34
34
|
|
|
35
|
-
This method binds the `
|
|
35
|
+
This method binds the `Logger` implementation to the `ILogger`
|
|
36
36
|
contract within the application's dependency injection container. The service
|
|
37
37
|
is initialized with the application's logging configuration and registered
|
|
38
38
|
with a specific alias for internal framework identification.
|
|
@@ -50,12 +50,12 @@ class LoggerProvider(ServiceProvider):
|
|
|
50
50
|
# Retrieve logging configuration from application config
|
|
51
51
|
logging_config = self.app.config('logging')
|
|
52
52
|
|
|
53
|
-
# Create
|
|
54
|
-
logger_service =
|
|
53
|
+
# Create Logger instance with the retrieved configuration
|
|
54
|
+
logger_service = Logger(logging_config)
|
|
55
55
|
|
|
56
56
|
# Register the service instance in the container with interface binding and alias
|
|
57
57
|
self.app.instance(
|
|
58
|
-
|
|
58
|
+
ILogger, # Interface contract
|
|
59
59
|
logger_service, # Concrete implementation instance
|
|
60
60
|
alias="x-orionis.services.log.log_service" # Internal framework alias
|
|
61
61
|
)
|
orionis/metadata/framework.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from orionis.foundation.config.logging.entities.logging import Logging
|
|
2
2
|
from orionis.foundation.config.logging.enums import Level
|
|
3
|
-
from orionis.services.log.contracts.log_service import
|
|
3
|
+
from orionis.services.log.contracts.log_service import ILogger
|
|
4
4
|
from orionis.services.log.exceptions import LoggerRuntimeError
|
|
5
5
|
from orionis.services.log.handlers.filename import FileNameLogger
|
|
6
6
|
from orionis.services.log.handlers.size_rotating import PrefixedSizeRotatingFileHandler
|
|
7
7
|
from orionis.services.log.handlers.timed_rotating import PrefixedTimedRotatingFileHandler
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class Logger(ILogger):
|
|
10
10
|
|
|
11
11
|
def __init__(
|
|
12
12
|
self,
|
|
@@ -14,7 +14,7 @@ class LoggerService(ILoggerService):
|
|
|
14
14
|
**kwargs
|
|
15
15
|
):
|
|
16
16
|
"""
|
|
17
|
-
Initializes the
|
|
17
|
+
Initializes the Logger instance with the provided logging configuration.
|
|
18
18
|
|
|
19
19
|
This constructor sets up the logger configuration using either a `Logging` object,
|
|
20
20
|
a configuration dictionary, or keyword arguments. It validates the input and
|
|
@@ -11,11 +11,11 @@ orionis/console/base/command.py,sha256=nasVPyKEvuv8sDFEWXhHyBCWAmSLfPPm2XlKaYYt_
|
|
|
11
11
|
orionis/console/base/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
orionis/console/base/contracts/command.py,sha256=vmAJD0yMQ5-AD_s9_xCFEAl64sKk65z7U2E196dALQM,5760
|
|
13
13
|
orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
orionis/console/commands/version.py,sha256=
|
|
14
|
+
orionis/console/commands/version.py,sha256=0neKUq7MulO0hLZyU9LLfIQYEaQtnm3faIjIfeK52V8,2886
|
|
15
15
|
orionis/console/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
orionis/console/contracts/kernel.py,sha256=mh4LlhEYHh3FuGZZQ0GBhD6ZLa5YQvaNj2r01IIHI5Y,826
|
|
17
17
|
orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
orionis/console/core/reactor.py,sha256=
|
|
18
|
+
orionis/console/core/reactor.py,sha256=soDKgpUv6yJRbBi2KYSaIBl7Wduuh18M6_r_GJUlt-4,21440
|
|
19
19
|
orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
orionis/console/dumper/dump.py,sha256=CATERiQ6XuIrKQsDaWcVxzTtlAJI9qLJX44fQxEX8ws,22443
|
|
21
21
|
orionis/console/dumper/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -69,7 +69,7 @@ orionis/container/validators/is_subclass.py,sha256=4sBaGLoRs8nUhuWjlP0VJqyTwVHYq
|
|
|
69
69
|
orionis/container/validators/is_valid_alias.py,sha256=4uAYcq8xov7jZbXnpKpjNkxcZtlTNnL5RRctVPMwJes,1424
|
|
70
70
|
orionis/container/validators/lifetime.py,sha256=IQ43fDNrxYHMlZH2zlYDJnlkLO_eS4U7Fs3UJgQBidI,1844
|
|
71
71
|
orionis/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
-
orionis/foundation/application.py,sha256=
|
|
72
|
+
orionis/foundation/application.py,sha256=NJnNMI7rRs-UUqrBeKz4qFWh8m4CxSzfXIeFXqWyNIE,76913
|
|
73
73
|
orionis/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
74
|
orionis/foundation/config/startup.py,sha256=vbzduprRCNyYeR2nnMaqc1uKXw6PTzAY2jVfXNQKN8I,9691
|
|
75
75
|
orionis/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -175,12 +175,12 @@ orionis/foundation/providers/console_provider.py,sha256=9oDHOGm79O8OtwTFPCYl4hNQ
|
|
|
175
175
|
orionis/foundation/providers/dumper_provider.py,sha256=nKHjLDClCo-KnPloh6EYVySjgzf6SYSvoxVD6IwJt8M,3355
|
|
176
176
|
orionis/foundation/providers/executor_provider.py,sha256=kwkH8YWEXoEoP51akJXQJ0U25rhlOLxnfE0s9fALr0I,3478
|
|
177
177
|
orionis/foundation/providers/inspirational_provider.py,sha256=uq2o0uLd5p6PR99uH4cJAcc6NnU6nIOwe0ZIdzZcF4Q,3726
|
|
178
|
-
orionis/foundation/providers/logger_provider.py,sha256=
|
|
178
|
+
orionis/foundation/providers/logger_provider.py,sha256=bEJug46TNNxuqfCI8eI-GSp0eyNromvBDszQGK-0roc,3607
|
|
179
179
|
orionis/foundation/providers/progress_bar_provider.py,sha256=X4Ke7mPr0MgVp6WDNaQ3bI3Z_LOS8qE-wid0MQErKms,3367
|
|
180
180
|
orionis/foundation/providers/testing_provider.py,sha256=YTubcNnWrG3SPx5NM5HgYefvUYoXdlzXcjljnjavUwM,6462
|
|
181
181
|
orionis/foundation/providers/workers_provider.py,sha256=5CvlUETdIblh7Wx8pT0MswTeTCGhYah-EvFqOrLu8Mo,4113
|
|
182
182
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
183
|
-
orionis/metadata/framework.py,sha256=
|
|
183
|
+
orionis/metadata/framework.py,sha256=oSHL9LvTh8EDTJZ8jCIrUJM3JI8L6rsiWy1p93G_r-U,4088
|
|
184
184
|
orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
|
|
185
185
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
186
186
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -251,9 +251,9 @@ orionis/services/introspection/modules/contracts/reflection.py,sha256=YLqKg5Ehad
|
|
|
251
251
|
orionis/services/introspection/objects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
252
252
|
orionis/services/introspection/objects/types.py,sha256=vNKWc2b7K-X7B2X8RCimgAWQqbQlVT-aL24nUB8t_yQ,6343
|
|
253
253
|
orionis/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
254
|
-
orionis/services/log/log_service.py,sha256=
|
|
254
|
+
orionis/services/log/log_service.py,sha256=PY8a7DB-kCOlwtG85J_ASQIPRw0_aRGBiqlyQho0Gxw,11316
|
|
255
255
|
orionis/services/log/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
256
|
-
orionis/services/log/contracts/log_service.py,sha256=
|
|
256
|
+
orionis/services/log/contracts/log_service.py,sha256=YVWkK5z6-3jyJv6aT8fbp53nQBF8jlD-aHGKqFYPdAM,1692
|
|
257
257
|
orionis/services/log/exceptions/__init__.py,sha256=PPn_LBV3U-0Yi69ZLDQmlkbmlL1iLTleLw-s88Ipg9o,84
|
|
258
258
|
orionis/services/log/exceptions/runtime.py,sha256=LnaK0w0WlgxtZ9Zjn9RYIgp6fbQZmXZ_1fy9dkuA2jQ,468
|
|
259
259
|
orionis/services/log/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -345,7 +345,7 @@ orionis/test/validators/web_report.py,sha256=n9BfzOZz6aEiNTypXcwuWbFRG0OdHNSmCNu
|
|
|
345
345
|
orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnIfJYgc,1206
|
|
346
346
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
347
347
|
orionis/test/view/render.py,sha256=f-zNhtKSg9R5Njqujbg2l2amAs2-mRVESneLIkWOZjU,4082
|
|
348
|
-
orionis-0.
|
|
348
|
+
orionis-0.454.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
|
|
349
349
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
350
350
|
tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
351
351
|
tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -455,7 +455,7 @@ tests/services/introspection/reflection/test_reflection_module.py,sha256=a4sjSHe
|
|
|
455
455
|
tests/services/introspection/reflection/mock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
456
456
|
tests/services/introspection/reflection/mock/fake_reflect_instance.py,sha256=iMf_yKgk0Y91XUHhRcl2qw7Z83QeNspvLi_tl4Dp-rI,28032
|
|
457
457
|
tests/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
458
|
-
tests/services/log/test_log.py,sha256=
|
|
458
|
+
tests/services/log/test_log.py,sha256=AWaEjBbUxz_1-GNsqEyb36EyD6ZtrHd51DnxA3I5nvE,2798
|
|
459
459
|
tests/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
460
460
|
tests/services/system/test_services_system_imports.py,sha256=jbtIQkw_4DI6x2E-4Lg3evnLAgCgDIBWE63LdJTLkxc,7507
|
|
461
461
|
tests/services/system/test_services_system_workers.py,sha256=wITbpJHKW_OXqTaFeteNRFuw5Q3_7d9lWNJnFE2r6to,5052
|
|
@@ -488,8 +488,8 @@ tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
|
488
488
|
tests/testing/validators/test_testing_validators.py,sha256=WPo5GxTP6xE-Dw3X1vZoqOMpb6HhokjNSbgDsDRDvy4,16588
|
|
489
489
|
tests/testing/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
490
490
|
tests/testing/view/test_render.py,sha256=tnnMBwS0iKUIbogLvu-7Rii50G6Koddp3XT4wgdFEYM,1050
|
|
491
|
-
orionis-0.
|
|
492
|
-
orionis-0.
|
|
493
|
-
orionis-0.
|
|
494
|
-
orionis-0.
|
|
495
|
-
orionis-0.
|
|
491
|
+
orionis-0.454.0.dist-info/METADATA,sha256=ka4ELLbV-p9I2aj-3AbF6rGacgecPpH2QGSbCiOkqJk,4772
|
|
492
|
+
orionis-0.454.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
493
|
+
orionis-0.454.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
|
494
|
+
orionis-0.454.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
495
|
+
orionis-0.454.0.dist-info/RECORD,,
|
tests/services/log/test_log.py
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
from orionis.services.log.log_service import
|
|
1
|
+
from orionis.services.log.log_service import Logger
|
|
2
2
|
from orionis.support.facades.logger import Log
|
|
3
3
|
from orionis.test.cases.asynchronous import AsyncTestCase
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class TestLogger(AsyncTestCase):
|
|
6
6
|
|
|
7
7
|
async def testHasInfoMethod(self):
|
|
8
8
|
"""
|
|
9
|
-
Checks if the
|
|
9
|
+
Checks if the Logger class has an 'info' method.
|
|
10
10
|
|
|
11
11
|
Returns
|
|
12
12
|
-------
|
|
13
13
|
None
|
|
14
14
|
This test passes if the 'info' method exists, otherwise it fails.
|
|
15
15
|
"""
|
|
16
|
-
self.assertTrue(hasattr(
|
|
16
|
+
self.assertTrue(hasattr(Logger, "info"))
|
|
17
17
|
|
|
18
18
|
async def testHasErrorMethod(self):
|
|
19
19
|
"""
|
|
20
|
-
Checks if the
|
|
20
|
+
Checks if the Logger class has an 'error' method.
|
|
21
21
|
|
|
22
22
|
Returns
|
|
23
23
|
-------
|
|
24
24
|
None
|
|
25
25
|
This test passes if the 'error' method exists, otherwise it fails.
|
|
26
26
|
"""
|
|
27
|
-
self.assertTrue(hasattr(
|
|
27
|
+
self.assertTrue(hasattr(Logger, "error"))
|
|
28
28
|
|
|
29
29
|
async def testHasWarningMethod(self):
|
|
30
30
|
"""
|
|
31
|
-
Checks if the
|
|
31
|
+
Checks if the Logger class has a 'warning' method.
|
|
32
32
|
|
|
33
33
|
Returns
|
|
34
34
|
-------
|
|
35
35
|
None
|
|
36
36
|
This test passes if the 'warning' method exists, otherwise it fails.
|
|
37
37
|
"""
|
|
38
|
-
self.assertTrue(hasattr(
|
|
38
|
+
self.assertTrue(hasattr(Logger, "warning"))
|
|
39
39
|
|
|
40
40
|
async def testHasDebugMethod(self):
|
|
41
41
|
"""
|
|
42
|
-
Checks if the
|
|
42
|
+
Checks if the Logger class has a 'debug' method.
|
|
43
43
|
|
|
44
44
|
Returns
|
|
45
45
|
-------
|
|
46
46
|
None
|
|
47
47
|
This test passes if the 'debug' method exists, otherwise it fails.
|
|
48
48
|
"""
|
|
49
|
-
self.assertTrue(hasattr(
|
|
49
|
+
self.assertTrue(hasattr(Logger, "debug"))
|
|
50
50
|
|
|
51
51
|
async def testLoggerWritesInfo(self):
|
|
52
52
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|