Controlling Log Levels
ERROR
: Only show error messagesWARN
: Show warnings and errorsINFO
: Show general information, warnings, and errorsDEBUG
: Show all messages, including detailed debug information
--rp_log_level
flag enables the Runpod debugger, which can help you troubleshoot issues in your code.
Example:
Customizing the API Server
The following arguments allow you to configure the FastAPI server that simulates the Runpod serverless environment:--rp_serve_api
: Starts the API server--rp_api_port
: Sets the port number (default is 8000)--rp_api_concurrency
: Sets the number of concurrent workers (default is 1)--rp_api_host
: Sets the hostname (default is “localhost”)
Providing test input
As we saw in the previous lesson, you can provide test input either through a JSON file or directly via the command line:- Starts the local server
- Sets the log level to DEBUG for maximum information
- Enables the debugger
- Uses port 8080 for the API server
- Sets up 2 concurrent workers
- Provides a test input directly in the command