Skip to content

Commit 90342a4

Browse files
authored
Merge pull request #828 from UiPath/akshaya/allow_disable_of_log_interceptor
feat(LogInterceptor): allow disabling of log interceptor
2 parents c1b2b94 + 07426a5 commit 90342a4

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.1.131"
3+
version = "2.1.132"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath/_cli/_runtime/_contracts.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ class UiPathRuntimeContext(BaseModel):
384384
chat_handler: Optional[UiPathConversationHandler] = None
385385
is_conversational: Optional[bool] = None
386386
breakpoints: Optional[List[str] | Literal["*"]] = None
387+
intercept_logs: bool = True
387388

388389
model_config = {"arbitrary_types_allowed": True, "extra": "allow"}
389390

@@ -631,16 +632,17 @@ async def __aenter__(self):
631632

632633
# Intercept all stdout/stderr/logs
633634
# write to file (runtime) or stdout (debug)
634-
self.logs_interceptor = LogsInterceptor(
635-
min_level=self.context.logs_min_level,
636-
dir=self.context.runtime_dir,
637-
file=self.context.logs_file,
638-
job_id=self.context.job_id,
639-
execution_id=self.context.execution_id,
640-
is_debug_run=self.is_debug_run(),
641-
log_handler=self.context.log_handler,
642-
)
643-
self.logs_interceptor.setup()
635+
if self.context.intercept_logs:
636+
self.logs_interceptor = LogsInterceptor(
637+
min_level=self.context.logs_min_level,
638+
dir=self.context.runtime_dir,
639+
file=self.context.logs_file,
640+
job_id=self.context.job_id,
641+
execution_id=self.context.execution_id,
642+
is_debug_run=self.is_debug_run(),
643+
log_handler=self.context.log_handler,
644+
)
645+
self.logs_interceptor.setup()
644646

645647
logger.debug(f"Starting runtime with job id: {self.context.job_id}")
646648

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)