How can I console.log out to the server logs?

For a console.log to work in the server logs for a deployment, does it need to be wrapped in a compute?
Will the below log in the routes file show anything in the server logs if we skip the edge:

.match('/(.*)', ( ) => {
      console.log(`Decookie`);

The location of your console.log call will run during build time, not runtime. You would need to wrap the console.log in a compute in this case to see it in the server logs. For more information see Layer0 Documentation - Troubleshooting

1 Like