Stream Production Logs from the Nanobox CLI

Logs from live applications are now available in both your dashboard and Nanobox Desktop (the Nanobox CLI). Using the nanobox log command, you can stream live logs and/or view a specified number of historical logs.

# Pattern
nanobox log [<remote-alias>] [-n <number>]

# Examples
# Stream live logs
nanobox log
nanobox log production

# View historical logs
nanobox log -n 1000

Update Nanobox

This functionality is available with the most recent version of Nanobox Desktop. To update, run:


Existing Apps: Update Your Logger Component

In order for existing apps deployed with Nanobox to be able to stream logs to your local CLI, you need to update your Logger platform component. In your dashboard, click on "Platform," then click "Manage" under your Logger component.

Manage Logger Component

Under the "Admin" tab of your Logger component, there are multiple actions you can perform. Select either "Rebuild" or "Update" to update your Logger component to the most recent version.

Update the Logger Platform Component

Note: Updating the Logger component should not affect the uptime of your application. All new apps are deployed with the most recent version of the Logger component and do not need to be updated.

Working with Log Output

With the log output available in the Nanobox CLI, you can use whatever tools you have installed locally to filter and/or manipulate your log output. For example, you can use grep to filter logs.

# Filter out all but 'web.main' log
# output in the live log stream
nanobox log | grep web.main

'nanobox log' Documentation

Posted in Updates, Features