0
0
Agentic_aiml~10 mins

Logging tool calls and results in Agentic Ai - Interactive Code Practice

Choose your learning style8 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to log the start of a tool call.

Agentic_ai
logger.[1]("Starting tool execution")
Drag options to blanks, or click blank then click option'
Adebug
Binfo
Cwarn
Derror
Attempts:
3 left
2fill in blank
medium

Complete the code to log the result of a tool call.

Agentic_ai
logger.[1](f"Tool result: {result}")
Drag options to blanks, or click blank then click option'
Awarn
Bdebug
Cerror
Dinfo
Attempts:
3 left
3fill in blank
hard

Fix the error in the logging call to correctly log an exception.

Agentic_ai
logger.error(f"Tool failed with error: {error}", [1]=True)
Drag options to blanks, or click blank then click option'
Atraceback
Bexception
Cexc_info
Derror_info
Attempts:
3 left
4fill in blank
hard

Fill both blanks to log the tool call and its duration.

Agentic_ai
logger.[1](f"Tool {tool_name} called")
logger.[2](f"Duration: {duration} seconds")
Drag options to blanks, or click blank then click option'
Ainfo
Bdebug
Cwarn
Derror
Attempts:
3 left
5fill in blank
hard

Fill all three blanks to log tool call, result, and error if any.

Agentic_ai
logger.[1](f"Calling tool: {tool_name}")
logger.[2](f"Result: {result}")
if error:
    logger.[3](f"Error: {error}", exc_info=True)
Drag options to blanks, or click blank then click option'
Ainfo
Bdebug
Cerror
Dwarn
Attempts:
3 left