Monitor Deployed Functions
Use logging tools in the Salesforce CLI to monitor deployed functions. Receive a list of deployed functions and stream logs from running functions.
Display a list of your deployed functions for easy tracking.
View all your environments and their aliases:
Display details about a specific compute environment:
Salesforce Functions has logging tools to monitor, debug, and analyze how your deployed functions are running at the compute environment level. Logged activity for all functions deployed to a compute environment is captured in the same log. Filter log data by function, date and time, or any other logline field.
Any Apex logs created from your Apex code that invokes a Function isn't captured in compute environment logs. For dealing with log information from Apex code, see Working with Apex Debug Logs.
Start a Function Log
Environment logs aren't buffered and logline outputs occur after the command is executed. Start tailing the environment log in a separate shell before the function is invoked to capture log details.
Log information starts to output to the current shell. To stop capturing logs, quit the process by using Ctrl-C in your shell.
The log tail process will terminate after 1 hour of inactivity. Reuse
sf env log tail to continue logging.
sf env log tail -e MyComputeEnvironment and invoke your function.
Example log output for an invoked function: