Robocorp Log provides automatic trace logging capabilities for Python applications, primarily used within the Robocorp automation ecosystem. It automatically captures function calls, arguments, return values, and exceptions, generating structured log data for debugging and analysis. The current version is 3.1.2. It is part of the broader Robocorp framework, with releases often aligned with other components of the Robocorp ecosystem rather than having a standalone, independent cadence.
pip install robocorp-logVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to manually set up `robocorp-log` to capture execution traces of Python functions. It configures a temporary directory for log output and explicitly calls `setup_auto_logging()` to enable the automatic instrumentation. Run this script, then inspect the generated files (e.g., `.robocorp_log`, `log.html`) in the `temp_robocorp_log_output` directory.
Update any custom log parsing logic to read the new `.robocorp_log` binary format. Robocorp tools like Robocorp Lab or Assistant automatically handle this format. Consider using `robocorp-log`'s own log viewing capabilities or converting to HTML for easier inspection.
Always call `from robocorp.log import setup_auto_logging, add_log_output` and then `add_log_output(Path('your_log_dir'))` and `setup_auto_logging()` at the start of your script if you expect file-based logs outside of a Robocorp run.Use `robocorp.log.omit_secrets` as a context manager or `robocorp.log.add_sensitive_variables` to mark specific variables or function arguments for redaction in the logs.
Consider disabling auto-logging for specific functions or modules using `robocorp.log.exclude_methods_from_auto_logging` or tuning the level of detail if log file size becomes an issue. Only enable auto-logging for critical paths.
Ensure you call `from robocorp.log import add_log_output, setup_auto_logging` and then `add_log_output(Path('your_log_directory'))` and `setup_auto_logging()` at the start of your script, especially when running outside the Robocorp environment.Your old log parsing logic is incompatible. You need to update your parsers to handle the new `.robocorp_log` format. Consult Robocorp's documentation for tools or libraries that can read this new format, or rely on Robocorp's own log viewing tools.
Use `robocorp.log.omit_secrets(value)` to redact specific values or `robocorp.log.add_sensitive_variables(variable_names)` to declare variables whose contents should be hidden in logs.
No dependency data recorded yet.