Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated the no op debug logger documentation #39

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/intelligence_layer/core/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,7 @@ class NoOpDebugLogger:
"""

def log(self, message: str, value: PydanticSerializable) -> None:
"""Record a log of relevant information as part of a step within a task.

By default, the `Input` and `Output` of each `Task` are logged automatically, but you can
log anything else that seems relevant to understanding the output of a given task.
"""The `NoOpDebugLogger` does not do anything.

Args:
message: A description of the value you are logging, such as the step in the task this
Expand Down Expand Up @@ -199,10 +196,7 @@ def task_span(self, task_name: str, input: PydanticSerializable) -> "NoOpTaskSpa

class NoOpTaskSpan(NoOpDebugLogger, AbstractContextManager["NoOpTaskSpan"]):
def record_output(self, output: PydanticSerializable) -> None:
"""Record a `Task`'s output. Since a Context Manager can't provide this in the `__exit__`
method, output should be captured once it is generated.

This should be handled automatically within the execution of the task.
"""The `NoOpTaskSpan` does not do anything.

Args:
output: The output of the task that is being logged.
Expand Down