Skip to content

Logging

UbiOps captures and organizes logs from the code of deployments and pipelines, making them easy to access and review. Alongside these user-generated logs, system-level information is also provided, giving users a clearer understanding of how deployments and pipelines operate.

Logging-overview

The recommended way to access the logs is through the WebApp (available at https://app.ubiops.com for our SaaS solution). It is also possible to access the logs via CLI or Client libraries, see Interfacing with UbiOps.

Logs can be found under Logging in the left navigation panel. This will show a list of recent log lines. By default, UbiOps saves the logs for 1 year(depending on your subscription). If you need longer log retention, please contact us via our support portal. It is possible to filter logs on date, or on properties like pipeline_name. Text search is supported too via the property 'text_search' in the WebApp. Some example queries can be found below.

Most objects in UbiOps (like deployments, pipelines, requests and builds) have a LOGS button which redirects to the logging page and automatically applies a filter for the relevant object. These filters can also be applied manually by writing a log query.

Log query

Logs can be filtered by writing a query. This can help you to find logs of a certain event. The filter query can contain text search and label filters. Text search should come before any label filters and can be defined by using the text_search key. The value for text_search should be given as string with double quotes around it. The following query will find logs containing the text text filtering:

text_search="text filtering"

It is also possible to apply a negative text search. By using != operation instead of =. Only logs will appear that do not contain the text search value, for example:

text_search!="excluded text"

Label filters apply an exact match on log metadata. It is possible to filter on keys like deployment_name, deployment_version, pipeline_name, deployment_request_id and pipeline_request_id. Click on one of your logs to show the available metadata of the log.

Similar to text search, it is possible to use != operation for label filtering to find logs that do not match the label value. Two examples of valid queries are:

deployment_name="my-deployment"

and

deployment_name!="excluded-deployment"

To apply both text search and label filtering, you should provide the text search first. Multiple text searches and label filters can be applied in the same query:

text_search="text filtering"
text_search="additional text filtering"
text_search!="and excluding this"
deployment_name="my-deployment"
pipeline_name!="my-pipeline"

Log levels

UbiOps supports different log levels: info and error. Logs printed with, for example, print, logging.debug, logging.info and logging.warning are marked with level=info. While, logs printed with logging.error and exceptions are marked with level=error.

The level of the logs are visible in UbiOps WebApp, and it is possible to filter on the level.

System logs

UbiOps distinguishes system level and user level logs from one another by means of a system flag. System logs are logs that are generated by UbiOps. User level logs are logs that are generated by your code. You can filter on the different types of logs by setting the system filter to either true or false.

Purpose of logs

The logs are your primary source of information for debugging if something goes wrong. Anything that is outputted by the code of your deployments can be found in the logs. So if something goes wrong in your deployment code, the error stacktrace can be found in the logs. If you need help with debugging, please take a look at the troubleshooting section.

Logs are also helpful for knowing what is happening in the background, for instance when your deployment is building. You might have noticed that when you create a new deployment version, and you go to the version details page, you will see a button called build logs. If you click on this button you can see all the logs related to the building process of your deployment.