You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/serverless/worker.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,19 @@
1
1
# The Serverless Worker
2
2
3
+
## Logging
4
+
5
+
The worker outputs logs to the console at different points in the workers lifecycle. These logs can be used to debug issues with the worker or handler. There are four logging levels that can be used to control the verbosity of the logs:
6
+
7
+
1.`DEBUG` (Default) - Outputs all logs, including debug logs.
8
+
9
+
2.`INFO` - Outputs all logs except debug logs.
10
+
11
+
3.`WARNING` - Outputs only warning and error logs.
12
+
13
+
4.`ERROR` - Outputs only error logs.
14
+
15
+
To set the logging level, set the `RUNPOD_DEBUG_LEVEL` environment variable to one of the above logging levels. For example, to set the logging level to `INFO`, set the `RUNPOD_DEBUG_LEVEL` environment variable to `INFO`.
16
+
3
17
## Error Handling
4
18
5
19
The worker is designed to handle errors raised by the handler gracefully. If the handler raises an error, the worker will capture this error and return it as the job output along with the stack trace.
0 commit comments