orionis 0.408.0__py3-none-any.whl → 0.410.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.
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.408.0"
8
+ VERSION = "0.410.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -4,20 +4,72 @@ class ILoggerService(ABC):
4
4
 
5
5
  @abstractmethod
6
6
  def info(self, message: str) -> None:
7
- """Log an informational message."""
7
+ """
8
+ Logs an informational message.
9
+
10
+ Parameters
11
+ ----------
12
+ message : str
13
+ The message to be logged as informational.
14
+
15
+ Returns
16
+ -------
17
+ None
18
+ This method does not return any value.
19
+ """
20
+ # To be implemented by subclasses
8
21
  pass
9
22
 
10
23
  @abstractmethod
11
24
  def error(self, message: str) -> None:
12
- """Log an error message."""
25
+ """
26
+ Logs an error message.
27
+
28
+ Parameters
29
+ ----------
30
+ message : str
31
+ The message to be logged as an error.
32
+
33
+ Returns
34
+ -------
35
+ None
36
+ This method does not return any value.
37
+ """
38
+ # To be implemented by subclasses
13
39
  pass
14
40
 
15
41
  @abstractmethod
16
42
  def warning(self, message: str) -> None:
17
- """Log a warning message."""
43
+ """
44
+ Logs a warning message.
45
+
46
+ Parameters
47
+ ----------
48
+ message : str
49
+ The message to be logged as a warning.
50
+
51
+ Returns
52
+ -------
53
+ None
54
+ This method does not return any value.
55
+ """
56
+ # To be implemented by subclasses
18
57
  pass
19
58
 
20
59
  @abstractmethod
21
60
  def debug(self, message: str) -> None:
22
- """Log a debug message."""
61
+ """
62
+ Logs a debug message.
63
+
64
+ Parameters
65
+ ----------
66
+ message : str
67
+ The message to be logged for debugging purposes.
68
+
69
+ Returns
70
+ -------
71
+ None
72
+ This method does not return any value.
73
+ """
74
+ # To be implemented by subclasses
23
75
  pass
@@ -12,19 +12,27 @@ class FileNameLogger:
12
12
  ----------
13
13
  path : str
14
14
  The original file path for the log file.
15
- """
16
15
 
17
- # If the path is not a string or is empty, raise a ValueError
16
+ Raises
17
+ ------
18
+ ValueError
19
+ If the provided path is not a non-empty string.
20
+ """
21
+ # Validate that the path is a non-empty string
18
22
  if not isinstance(path, str) or not path:
19
23
  raise ValueError("The 'path' parameter must be a non-empty string.")
20
24
 
21
- # Set the instance variable __path to the stripped path
25
+ # Store the stripped path as a private instance variable
22
26
  self.__path = path.strip()
23
27
 
24
28
  def generate(self) -> str:
25
29
  """
26
30
  Generate a new log file path with a timestamp prefix.
27
31
 
32
+ The method constructs a new file path by prefixing the original file name
33
+ with a timestamp in the format 'YYYYMMDD_HHMMSS'. It also ensures that the
34
+ directory for the log file exists, creating it if necessary.
35
+
28
36
  Returns
29
37
  -------
30
38
  str
@@ -32,10 +40,10 @@ class FileNameLogger:
32
40
 
33
41
  Notes
34
42
  -----
35
- The method ensures that the directory for the log file exists.
43
+ - The timestamp is generated using the current date and time.
44
+ - The directory for the log file is created if it does not exist.
36
45
  """
37
-
38
- # Split the original path to extract the base name and extension
46
+ # Split the original path into components based on the separator
39
47
  if '/' in self.__path:
40
48
  parts = self.__path.split('/')
41
49
  elif '\\' in self.__path:
@@ -43,22 +51,22 @@ class FileNameLogger:
43
51
  else:
44
52
  parts = self.__path.split(os.sep)
45
53
 
46
- # Get the base name and extension
54
+ # Extract the base file name and its extension
47
55
  filename, ext = os.path.splitext(parts[-1])
48
56
 
49
- # Create the path without the last part
57
+ # Reconstruct the directory path (excluding the file name)
50
58
  path = os.path.join(*parts[:-1]) if len(parts) > 1 else ''
51
59
 
52
- # Prefix the base name with a timestamp
60
+ # Generate a timestamp prefix for the file name
53
61
  prefix = datetime.now().strftime("%Y%m%d_%H%M%S")
54
62
 
55
- # Join the path, prefix, and filename to create the full path
63
+ # Build the full file path with the timestamped file name
56
64
  full_path = os.path.join(path, f"{prefix}_{filename}{ext}")
57
65
 
58
- # Ensure the log directory exists
66
+ # Ensure the log directory exists; create it if it does not
59
67
  log_dir = Path(full_path).parent
60
68
  if not log_dir.exists():
61
69
  log_dir.mkdir(parents=True, exist_ok=True)
62
70
 
63
- # Return the full path as a string
71
+ # Return the full path to the timestamped log file
64
72
  return full_path
@@ -5,17 +5,25 @@ class PrefixedSizeRotatingFileHandler(RotatingFileHandler):
5
5
 
6
6
  def rotation_filename(self, default_name) -> str:
7
7
  """
8
- Generate a rotated log filename by prefixing the original filename with a timestamp.
8
+ Generates a rotated log filename by prefixing the original filename with a timestamp.
9
9
 
10
10
  Parameters
11
11
  ----------
12
12
  default_name : str
13
- The original file path to be rotated.
13
+ The original file path that is subject to rotation.
14
14
 
15
15
  Returns
16
16
  -------
17
17
  str
18
- The new file path with the base name prefixed by a timestamp in the format 'YYYYMMDD_HHMMSS'.
18
+ The new file path as a string, where the base name is prefixed with a timestamp
19
+ in the format 'YYYYMMDD_HHMMSS'. This ensures uniqueness and chronological ordering
20
+ of rotated log files.
21
+
22
+ Notes
23
+ -----
24
+ This method utilizes the FileNameLogger class to construct the prefixed filename.
25
+ The timestamp prefix helps in identifying the creation time of each rotated log file.
19
26
  """
20
27
 
28
+ # Generate the new filename using FileNameLogger, which adds a timestamp prefix.
21
29
  return FileNameLogger(default_name).generate()
@@ -5,17 +5,25 @@ class PrefixedTimedRotatingFileHandler(TimedRotatingFileHandler):
5
5
 
6
6
  def rotation_filename(self, default_name) -> str:
7
7
  """
8
- Generate a rotated log filename by prefixing the original filename with a timestamp.
8
+ Generates a rotated log filename by prefixing the original filename with a timestamp.
9
9
 
10
10
  Parameters
11
11
  ----------
12
12
  default_name : str
13
- The original file path to be rotated.
13
+ The original file path that is subject to rotation.
14
14
 
15
15
  Returns
16
16
  -------
17
17
  str
18
- The new file path with the base name prefixed by a timestamp in the format 'YYYYMMDD_HHMMSS'.
18
+ The new file path as a string, where the base name is prefixed with a timestamp
19
+ in the format 'YYYYMMDD_HHMMSS'. This ensures each rotated log file is uniquely
20
+ identified by its creation time.
21
+
22
+ Notes
23
+ -----
24
+ This method utilizes the FileNameLogger class to construct the new filename.
25
+ The timestamp prefix helps in organizing and distinguishing rotated log files.
19
26
  """
20
27
 
28
+ # Use FileNameLogger to generate a new filename with a timestamp prefix
21
29
  return FileNameLogger(default_name).generate()
@@ -14,33 +14,46 @@ class LoggerService(ILoggerService):
14
14
  **kwargs
15
15
  ):
16
16
  """
17
- Initialize the LoggerService with the provided configuration.
17
+ Initializes the LoggerService instance with the provided logging configuration.
18
+
19
+ This constructor sets up the logger configuration using either a `Logging` object,
20
+ a configuration dictionary, or keyword arguments. It validates the input and
21
+ ensures that the configuration is properly instantiated before initializing
22
+ the logger. If no configuration is provided, it attempts to create one using
23
+ the supplied keyword arguments.
18
24
 
19
25
  Parameters
20
26
  ----------
21
27
  config : Logging or dict, optional
22
- The logging configuration. Can be an instance of the Logging class,
23
- a dictionary of configuration parameters, or None. If None, configuration
24
- is initialized using kwargs.
28
+ The logging configuration. Can be an instance of the `Logging` class,
29
+ a dictionary containing configuration parameters, or None. If None,
30
+ configuration is initialized using `kwargs`.
25
31
  **kwargs
26
- Additional keyword arguments used to initialize the Logging configuration
27
- if config is None.
32
+ Additional keyword arguments used to initialize the `Logging` configuration
33
+ if `config` is None.
34
+
35
+ Returns
36
+ -------
37
+ None
38
+ This method does not return any value. It sets up the logger service instance.
28
39
 
29
40
  Raises
30
41
  ------
31
42
  LoggerRuntimeError
32
- If the logger configuration cannot be initialized from the provided arguments.
43
+ If the logger configuration cannot be initialized from the provided arguments,
44
+ such as invalid types or missing required parameters.
33
45
  """
34
46
 
35
- # Attributes
47
+ # Initialize private attributes for logger and configuration
36
48
  self.__logger = None
37
49
  self.__config = None
38
50
 
39
- # Initialize the logger configuration using **kwargs if provided
51
+ # If no configuration is provided, attempt to create one using kwargs
40
52
  if config is None:
41
53
  try:
42
54
  self.__config = Logging(**kwargs)
43
55
  except Exception as e:
56
+ # Raise a runtime error if configuration initialization fails
44
57
  raise LoggerRuntimeError(
45
58
  f"Error initializing logger configuration: {e}. "
46
59
  "Please check the provided parameters. "
@@ -49,54 +62,64 @@ class LoggerService(ILoggerService):
49
62
  f"Expected: {Logging.__module__}.{Logging.__name__} or dict."
50
63
  )
51
64
 
52
- # If config is a dictionary, convert it to Logging
65
+ # If config is a dictionary, convert it to a Logging instance
53
66
  elif isinstance(config, dict):
54
67
  self.__config = Logging(**config)
55
68
 
56
- # If config is already an instance of Logging, use it directly
69
+ # If config is already a Logging instance, use it directly
57
70
  elif isinstance(config, Logging):
58
71
  self.__config = config
59
72
 
60
- # Initialize LoggerService
73
+ # Initialize the logger using the validated configuration
61
74
  self.__initLogger()
62
75
 
63
76
  def __initLogger(self):
64
77
  """
65
- Configures the logger with the specified settings.
78
+ Initializes and configures the logger instance based on the provided settings.
79
+
80
+ This method sets up the logger to write logs to a file, using different handlers
81
+ depending on the logging channel type (e.g., stack, hourly, daily, weekly, monthly, chunked).
82
+ It ensures the log format includes a timestamp, log level, and message. If the specified
83
+ log directory does not exist, it is created automatically. The logger's level and retention
84
+ policies are determined by the configuration.
85
+
86
+ Parameters
87
+ ----------
88
+ None
66
89
 
67
- This method sets up the logger to write logs to a file. If the specified
68
- directory does not exist, it creates it. The log format includes the
69
- timestamp and the log message.
90
+ Returns
91
+ -------
92
+ None
93
+ This method does not return any value. It sets up the logger instance as an attribute.
70
94
 
71
95
  Raises
72
96
  ------
73
97
  LoggerRuntimeError
74
- If the logger cannot be initialized due to an error.
98
+ If the logger cannot be initialized due to an error in configuration or handler setup.
75
99
  """
76
100
  import logging
77
101
  from datetime import datetime
78
102
 
79
103
  try:
80
-
81
- # List to hold the handlers
104
+ # List to hold the logging handlers
82
105
  handlers = []
83
106
 
84
- # Get the channel from the configuration
107
+ # Retrieve the default logging channel from configuration
85
108
  channel: str = self.__config.default
86
109
 
87
- # Get the configuration for the specified channel
110
+ # Get the configuration object for the selected channel
88
111
  config_channels = getattr(self.__config.channels, channel)
89
112
 
90
- # Get the path from the channel configuration
113
+ # Generate the log file path using the FileNameLogger utility
91
114
  path: str = FileNameLogger(getattr(config_channels, 'path')).generate()
92
115
 
93
- # Get Level from the channel configuration, defaulting to 10 (DEBUG)
116
+ # Determine the logging level (default to DEBUG if not specified)
94
117
  level: Level | int = getattr(config_channels, 'level', 10)
95
118
  level = level if isinstance(level, int) else level.value
96
119
 
97
- # Create handlers based on the channel type
120
+ # Select and configure the appropriate handler based on the channel type
98
121
  if channel == "stack":
99
-
122
+ # Simple file handler for stack channel
100
123
  handlers = [
101
124
  logging.FileHandler(
102
125
  filename=path,
@@ -105,89 +128,92 @@ class LoggerService(ILoggerService):
105
128
  ]
106
129
 
107
130
  elif channel == "hourly":
108
-
131
+ # Rotating file handler for hourly logs
109
132
  handlers = [
110
133
  PrefixedTimedRotatingFileHandler(
111
- filename = path,
112
- when = "h",
113
- interval = 1,
114
- backupCount = getattr(config_channels, 'retention_hours', 24),
115
- encoding = "utf-8",
116
- utc = False
134
+ filename=path,
135
+ when="h",
136
+ interval=1,
137
+ backupCount=getattr(config_channels, 'retention_hours', 24),
138
+ encoding="utf-8",
139
+ utc=False
117
140
  )
118
141
  ]
119
142
 
120
143
  elif channel == "daily":
121
-
144
+ # Rotating file handler for daily logs
122
145
  handlers = [
123
146
  PrefixedTimedRotatingFileHandler(
124
- filename = path,
125
- when = "d",
126
- interval = 1,
127
- backupCount = getattr(config_channels, 'retention_days', 7),
128
- encoding = "utf-8",
129
- atTime = datetime.strptime(getattr(config_channels, 'at', "00:00"), "%H:%M").time(),
130
- utc = False
147
+ filename=path,
148
+ when="d",
149
+ interval=1,
150
+ backupCount=getattr(config_channels, 'retention_days', 7),
151
+ encoding="utf-8",
152
+ atTime=datetime.strptime(getattr(config_channels, 'at', "00:00"), "%H:%M").time(),
153
+ utc=False
131
154
  )
132
155
  ]
133
156
 
134
157
  elif channel == "weekly":
135
-
158
+ # Rotating file handler for weekly logs
136
159
  handlers = [
137
160
  PrefixedTimedRotatingFileHandler(
138
- filename = path,
139
- when = "w0",
140
- interval = 1,
141
- backupCount = getattr(config_channels, 'retention_weeks', 4),
142
- encoding = "utf-8",
143
- utc = False
161
+ filename=path,
162
+ when="w0",
163
+ interval=1,
164
+ backupCount=getattr(config_channels, 'retention_weeks', 4),
165
+ encoding="utf-8",
166
+ utc=False
144
167
  )
145
168
  ]
146
169
 
147
170
  elif channel == "monthly":
148
-
171
+ # Rotating file handler for monthly logs
149
172
  handlers = [
150
173
  PrefixedTimedRotatingFileHandler(
151
- filename = path,
152
- when = "midnight",
153
- interval = 30,
154
- backupCount = getattr(config_channels, 'retention_months', 4),
155
- encoding = "utf-8",
156
- utc = False
174
+ filename=path,
175
+ when="midnight",
176
+ interval=30,
177
+ backupCount=getattr(config_channels, 'retention_months', 4),
178
+ encoding="utf-8",
179
+ utc=False
157
180
  )
158
181
  ]
159
182
 
160
183
  elif channel == "chunked":
161
-
184
+ # Size-based rotating file handler for chunked logs
162
185
  handlers = [
163
186
  PrefixedSizeRotatingFileHandler(
164
- filename = path,
165
- maxBytes = getattr(config_channels, 'mb_size', 10) * 1024 * 1024,
166
- backupCount =getattr(config_channels, 'files', 5),
167
- encoding ="utf-8"
187
+ filename=path,
188
+ maxBytes=getattr(config_channels, 'mb_size', 10) * 1024 * 1024,
189
+ backupCount=getattr(config_channels, 'files', 5),
190
+ encoding="utf-8"
168
191
  )
169
192
  ]
170
193
 
171
- # Configure the logger
194
+ # Configure the logger with the selected handlers and formatting
172
195
  logging.basicConfig(
173
- level = level,
174
- format = "%(asctime)s [%(levelname)s] - %(message)s",
175
- datefmt = "%Y-%m-%d %H:%M:%S",
176
- encoding = "utf-8",
177
- handlers = handlers
196
+ level=level,
197
+ format="%(asctime)s [%(levelname)s] - %(message)s",
198
+ datefmt="%Y-%m-%d %H:%M:%S",
199
+ encoding="utf-8",
200
+ handlers=handlers
178
201
  )
179
202
 
180
- # Get the logger instance
203
+ # Store the logger instance as a private attribute
181
204
  self.__logger = logging.getLogger(__name__)
182
205
 
183
206
  except Exception as e:
184
-
185
207
  # Raise a runtime error if logger initialization fails
186
208
  raise LoggerRuntimeError(f"Failed to initialize logger: {e}")
187
209
 
188
210
  def info(self, message: str) -> None:
189
211
  """
190
- Log an informational message.
212
+ Logs an informational message to the configured logger.
213
+
214
+ This method records informational messages that highlight the progress or state
215
+ of the application at a coarse-grained level. The message is stripped of leading
216
+ and trailing whitespace before being logged.
191
217
 
192
218
  Parameters
193
219
  ----------
@@ -197,12 +223,19 @@ class LoggerService(ILoggerService):
197
223
  Returns
198
224
  -------
199
225
  None
226
+ This method does not return any value.
200
227
  """
228
+
229
+ # Log the informational message after stripping whitespace
201
230
  self.__logger.info(message.strip())
202
231
 
203
232
  def error(self, message: str) -> None:
204
233
  """
205
- Log an error message.
234
+ Logs an error-level message to the configured logger.
235
+
236
+ This method records error messages that indicate serious issues or failures
237
+ within the application. The message is stripped of leading and trailing
238
+ whitespace before being logged.
206
239
 
207
240
  Parameters
208
241
  ----------
@@ -212,12 +245,19 @@ class LoggerService(ILoggerService):
212
245
  Returns
213
246
  -------
214
247
  None
248
+ This method does not return any value.
215
249
  """
250
+
251
+ # Log the error message after stripping whitespace
216
252
  self.__logger.error(message.strip())
217
253
 
218
254
  def warning(self, message: str) -> None:
219
255
  """
220
- Log a warning message.
256
+ Log a warning-level message to the configured logger.
257
+
258
+ This method records warning messages that indicate potential issues or
259
+ unexpected situations in the application. The message is stripped of
260
+ leading and trailing whitespace before being logged.
221
261
 
222
262
  Parameters
223
263
  ----------
@@ -227,20 +267,30 @@ class LoggerService(ILoggerService):
227
267
  Returns
228
268
  -------
229
269
  None
270
+ This method does not return any value.
230
271
  """
272
+
273
+ # Log the warning message after stripping whitespace
231
274
  self.__logger.warning(message.strip())
232
275
 
233
276
  def debug(self, message: str) -> None:
234
277
  """
235
- Log a debug message.
278
+ Logs a debug-level message to the configured logger.
279
+
280
+ This method records diagnostic messages that are useful for debugging
281
+ and development purposes. The message is stripped of leading and trailing
282
+ whitespace before being logged.
236
283
 
237
284
  Parameters
238
285
  ----------
239
286
  message : str
240
- The debug message to log.
287
+ The debug message to be logged.
241
288
 
242
289
  Returns
243
290
  -------
244
291
  None
292
+ This method does not return any value.
245
293
  """
294
+
295
+ # Log the debug message after stripping whitespace
246
296
  self.__logger.debug(message.strip())
@@ -1,5 +1,4 @@
1
1
  from abc import ABC, abstractmethod
2
- from typing import Optional
3
2
 
4
3
  class IResolver(ABC):
5
4
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.408.0
3
+ Version: 0.410.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -258,7 +258,7 @@ orionis/foundation/providers/progress_bar_provider.py,sha256=WW3grNgH-yV2meSSTeO
258
258
  orionis/foundation/providers/testing_provider.py,sha256=iJSN2RIChbYIL-1ue6vmPmDMCSrvERDkti4Er9MPiLA,1102
259
259
  orionis/foundation/providers/workers_provider.py,sha256=kiQjQRyUEyiBX2zcbF_KmqRgvc7Bvxsvg5oMtIvYniM,1075
260
260
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
261
- orionis/metadata/framework.py,sha256=lyVpWF0MG5Xr2V2hDnMRTAMzJ-rQJ2v7c8oWkA1Dmno,4960
261
+ orionis/metadata/framework.py,sha256=8BMmCsNHCJxxuPr1sLdcSdigrF3I8BnleyXlPN74N-o,4960
262
262
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
263
263
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
264
264
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -328,19 +328,19 @@ orionis/services/introspection/modules/contracts/reflection.py,sha256=YLqKg5Ehad
328
328
  orionis/services/introspection/objects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
329
329
  orionis/services/introspection/objects/types.py,sha256=vNKWc2b7K-X7B2X8RCimgAWQqbQlVT-aL24nUB8t_yQ,6343
330
330
  orionis/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
- orionis/services/log/log_service.py,sha256=IrqAXR4uMlR1kjvh6quPUgf_wJdR9oPe_sQKSoQMQCE,8148
331
+ orionis/services/log/log_service.py,sha256=DsbU8HVf035HxumFm4Xjo7kYhuXf0D57Xhuz7uzKhGo,11344
332
332
  orionis/services/log/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
333
- orionis/services/log/contracts/log_service.py,sha256=ky7T2EIvJQMV0tKMSwFsUxDBoA24xYro8ChC6-7iUtY,546
333
+ orionis/services/log/contracts/log_service.py,sha256=nTJaj32CbtAEliEdCa6fx-hekAHYEka-hEFiPkven6o,1691
334
334
  orionis/services/log/exceptions/__init__.py,sha256=PPn_LBV3U-0Yi69ZLDQmlkbmlL1iLTleLw-s88Ipg9o,84
335
335
  orionis/services/log/exceptions/runtime.py,sha256=LnaK0w0WlgxtZ9Zjn9RYIgp6fbQZmXZ_1fy9dkuA2jQ,468
336
336
  orionis/services/log/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
337
- orionis/services/log/handlers/filename.py,sha256=nq9eqwFt60oVA5CSsIwO-At37mQgxTd08aYSOpvnIrs,1989
338
- orionis/services/log/handlers/size_rotating.py,sha256=oE2dQ7GWeKRq5X4j6030mg_ZKZ1urUFXY-ZOG6lSquI,690
339
- orionis/services/log/handlers/timed_rotating.py,sha256=9wPf-dSt3E-KG8BGusnMp3gXu2oy_RWGGkqDm9zO5FU,701
337
+ orionis/services/log/handlers/filename.py,sha256=2BSW8_gQ-1GKccqC7FIGh_QnIxHgi2e-CarL2C0DGI8,2477
338
+ orionis/services/log/handlers/size_rotating.py,sha256=SLg7r-XW1NWyVxN8wJxeI8jhypzdXw_jq2zg5uy3iaQ,1131
339
+ orionis/services/log/handlers/timed_rotating.py,sha256=UJicPwHcIVl2FPRPjuiKwH3-zuiPG1YV7UYLLMPm4To,1128
340
340
  orionis/services/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
341
341
  orionis/services/paths/resolver.py,sha256=9PXTawN3QV142Fhe7C2EqXyAlf984Hc05A_M2cqXAps,3217
342
342
  orionis/services/paths/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
343
- orionis/services/paths/contracts/resolver.py,sha256=DzaA0ThOJXHh0xkQigayPPAvpheknulz_xCdezfuCQA,1290
343
+ orionis/services/paths/contracts/resolver.py,sha256=--kmKOX0m9Wt1ZkWUdFOJIJ58c4--KlD9NweH7UR0G4,1261
344
344
  orionis/services/paths/exceptions/__init__.py,sha256=r5b4D4XWNK07zLtqaXBk_PNYszScqbp_8kUN37cOk4E,184
345
345
  orionis/services/paths/exceptions/exception.py,sha256=cK-TbUT02X2lvbAP4yFdfHx4S45wBOcYl3_tiWd67UM,472
346
346
  orionis/services/paths/exceptions/file.py,sha256=bsK0QoXwRFyDeHvITxwmgaBuwiO2eoRUhRzNizmX1No,475
@@ -428,7 +428,7 @@ orionis/test/validators/web_report.py,sha256=-h3Fe9jY93_kzUhd2NBIqEfCcBpu-8Ei9x3
428
428
  orionis/test/validators/workers.py,sha256=LGffDKtK6SKixFKzIYPQpI5aFeQPAGXpv_LUtmEu6g4,1102
429
429
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
430
430
  orionis/test/view/render.py,sha256=3ICz68l-WF3BtnYqH5m-ktN9UD00MELMbmMnyJDV74A,4768
431
- orionis-0.408.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
431
+ orionis-0.410.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
432
432
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
433
433
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
434
434
  tests/container/test_container.py,sha256=asv8TkkupVoex6SWod74NBl4dSs7wb9mLmu_glNdNy8,14815
@@ -539,6 +539,8 @@ tests/services/inspection/reflection/test_reflection_instance.py,sha256=xaCLsTbl
539
539
  tests/services/inspection/reflection/test_reflection_module.py,sha256=NbHJT0BokFjgC4Jw6Ax0YP5QVircXmwC6uAO33CeIeM,19765
540
540
  tests/services/inspection/reflection/mock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
541
541
  tests/services/inspection/reflection/mock/fake_reflect_instance.py,sha256=iqWoT6tNym3OijK0wcF0iKMp3HTlq5kAoztzC4fdTlM,18595
542
+ tests/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
543
+ tests/services/log/test_log.py,sha256=fCI2gX9-YN1z-xPMwIlggUFHeBlqfUajQoyQu4dmao0,2868
542
544
  tests/services/path/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
543
545
  tests/services/path/test_services_resolver.py,sha256=aWSSFgV_D10t3llUeCWEBB1mF3dWrZbFn5XbJy2sQME,3903
544
546
  tests/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -559,8 +561,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=nTNrvJkMSPx_aopEQ9
559
561
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
560
562
  tests/testing/test_testing_result.py,sha256=aWOOJiHji_U7gcJHbDukgMmfBEEQCLQdyqpXJD5q4BE,4643
561
563
  tests/testing/test_testing_unit.py,sha256=Krz0Bw1toI9qvLtKtYe_slNvi7fYmZbHK1i4DRPMfUM,7952
562
- orionis-0.408.0.dist-info/METADATA,sha256=n5ql9Cat7kQbHjFV3goNTgyUPgouORkrqTgZuMIwjjE,4772
563
- orionis-0.408.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
564
- orionis-0.408.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
565
- orionis-0.408.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
566
- orionis-0.408.0.dist-info/RECORD,,
564
+ orionis-0.410.0.dist-info/METADATA,sha256=ElthJSB4RNC4kRMhMxFPPUnEVLqadnxCC-EXXwfK4Yc,4772
565
+ orionis-0.410.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
566
+ orionis-0.410.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
567
+ orionis-0.410.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
568
+ orionis-0.410.0.dist-info/RECORD,,
File without changes
@@ -0,0 +1,97 @@
1
+ from orionis.services.log.log_service import LoggerService
2
+ from orionis.support.facades.logger import Log
3
+ from orionis.test.cases.asynchronous import AsyncTestCase
4
+
5
+ class TestLoggerService(AsyncTestCase):
6
+
7
+ async def testHasInfoMethod(self):
8
+ """
9
+ Checks if the LoggerService class has an 'info' method.
10
+
11
+ Returns
12
+ -------
13
+ None
14
+ This test passes if the 'info' method exists, otherwise it fails.
15
+ """
16
+ self.assertTrue(hasattr(LoggerService, "info"))
17
+
18
+ async def testHasErrorMethod(self):
19
+ """
20
+ Checks if the LoggerService class has an 'error' method.
21
+
22
+ Returns
23
+ -------
24
+ None
25
+ This test passes if the 'error' method exists, otherwise it fails.
26
+ """
27
+ self.assertTrue(hasattr(LoggerService, "error"))
28
+
29
+ async def testHasWarningMethod(self):
30
+ """
31
+ Checks if the LoggerService class has a 'warning' method.
32
+
33
+ Returns
34
+ -------
35
+ None
36
+ This test passes if the 'warning' method exists, otherwise it fails.
37
+ """
38
+ self.assertTrue(hasattr(LoggerService, "warning"))
39
+
40
+ async def testHasDebugMethod(self):
41
+ """
42
+ Checks if the LoggerService class has a 'debug' method.
43
+
44
+ Returns
45
+ -------
46
+ None
47
+ This test passes if the 'debug' method exists, otherwise it fails.
48
+ """
49
+ self.assertTrue(hasattr(LoggerService, "debug"))
50
+
51
+ async def testLoggerWritesInfo(self):
52
+ """
53
+ Tests that the logger writes an info-level message.
54
+
55
+ Returns
56
+ -------
57
+ None
58
+ This test passes if the info message is processed without error.
59
+ """
60
+ # Log an info message
61
+ Log.info("Mensaje de prueba info")
62
+
63
+ async def testLoggerWritesError(self):
64
+ """
65
+ Tests that the logger writes an error-level message.
66
+
67
+ Returns
68
+ -------
69
+ None
70
+ This test passes if the error message is processed without error.
71
+ """
72
+ # Log an error message
73
+ Log.error("Mensaje de prueba error")
74
+
75
+ async def testLoggerWritesWarning(self):
76
+ """
77
+ Tests that the logger writes a warning-level message.
78
+
79
+ Returns
80
+ -------
81
+ None
82
+ This test passes if the warning message is processed without error.
83
+ """
84
+ # Log a warning message
85
+ Log.warning("Mensaje de prueba warning")
86
+
87
+ async def testLoggerWritesDebug(self):
88
+ """
89
+ Tests that the logger writes a debug-level message.
90
+
91
+ Returns
92
+ -------
93
+ None
94
+ This test passes if the debug message is processed without error.
95
+ """
96
+ # Log a debug message
97
+ Log.debug("Mensaje de prueba debug")