grpc_log_file_manager
drunc.grpc_testing_tools.grpc_log_file_manager
Classes
LogFileManager()
Manager for process log files with automatic creation and cleanup.
Creates unique log files in /tmp for each process and ensures proper cleanup after test completion to prevent file system clutter.
Initialise log file manager with empty state.
Source code in drunc/grpc_testing_tools/grpc_log_file_manager.py
Functions
check_for_errors()
Check all log files for gRPC error patterns.
Returns:
| Type | Description |
|---|---|
|
Error details if found, None otherwise |
Source code in drunc/grpc_testing_tools/grpc_log_file_manager.py
cleanup()
Remove all log files and temporary directory.
Source code in drunc/grpc_testing_tools/grpc_log_file_manager.py
create_log_file(process_name)
Create a unique log file for a process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
process_name
|
str
|
Name of the process requiring logging |
required |
Returns:
| Type | Description |
|---|---|
str
|
Full path to the created log file |
Source code in drunc/grpc_testing_tools/grpc_log_file_manager.py
get_all_log_files()
Retrieve list of all created log files.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of absolute paths to all created log files |