radical.asyncflow.logging¶
StructuredLogger ¶
StructuredLogger(logger: Logger)
Drop-in replacement that adds structured logging capabilities.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/logging.py
180 181 |
|
info ¶
info(message: str, **kwargs)
Enhanced info() that accepts both old and new usage patterns.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/logging.py
183 184 185 186 187 188 |
|
init_default_logger ¶
init_default_logger(log_level: Union[int, str] = INFO, *, output_file: Optional[Union[str, Path]] = None, file_log_level: Optional[Union[int, str]] = None, use_colors: bool = True, show_details: bool = False, style: str = 'modern', clear_handlers: bool = False, logger_name: Optional[str] = None, structured_logging: bool = False, structured_file: Optional[Union[str, Path]] = None) -> Logger
Setup and configure logging with enhanced features.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
log_level | Union[int, str] | Base logging level for console output. | INFO |
output_file | Optional[Union[str, Path]] | Path to log file. If provided, file logging is enabled. | None |
file_log_level | Optional[Union[int, str]] | Logging level for file output. Defaults to log_level. | None |
use_colors | bool | Enable colored console output. | True |
show_details | bool | Include thread/process info in log messages. | False |
style | str | Format style - 'modern', 'core', 'execution_backend', or 'minimal'. | 'modern' |
clear_handlers | bool | Remove existing handlers from root logger. | False |
logger_name | Optional[str] | Name for the logger. If None, returns root logger. | None |
structured_logging | bool | Enable JSON structured logging to file. | False |
structured_file | Optional[Union[str, Path]] | Custom path for structured JSON log file. | None |
Returns:
Type | Description |
---|---|
Logger | Configured logger instance. |
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/logging.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
get_structured_logger ¶
get_structured_logger(name: str = None, level: Union[int, str] = INFO) -> StructuredLogger
Get a structured logger that supports both old and new usage patterns.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/logging.py
353 354 355 356 357 358 359 360 361 362 363 |
|
get_logger ¶
get_logger(name: str = None, level: Union[int, str] = INFO) -> Logger
Quick logger setup for simple use cases.
Source code in doc_env/lib/python3.13/site-packages/radical/asyncflow/logging.py
367 368 369 370 371 372 373 |
|