Ruby‎ > ‎

Log

When you use the standard logger, your workers will just output to the cloud logs, not yours.

In order to log and debug your workers as they run in the cloud, simply use the log function.

Here's an example of what you'd put in your worker code:

log "Starting to do something..."
log "User: " + user.inspect

The log will be available for viewing via the SimpleWorker UI.

It can also be obtained via the API by either calling the class with the job_id.

SimpleWorker.service.log(job_id)

or:

worker.get_log
Comments