Over a million developers have joined DZone.

Configuration of the ibmliberty Image on Bluemix to Display Logs

DZone's Guide to

Configuration of the ibmliberty Image on Bluemix to Display Logs

When using the ibmliberty image, some of the logs don't show up. Here's how to fix that.

· Cloud Zone
Free Resource

Download this eBook outlining the critical components of success for SaaS companies - and the new rules you need to play by.  Brought to you in partnership with NuoDB.

IBM Bluemix provides a set of Docker images in the catalog to help developers to get started. Below is a short description how to configure the ibmliberty image to see the logs in the Bluemix dashboards and the CLIs.

The ibmliberty image is an extension of the websphere-liberty image on DockerHub. The ibmliberty image adds an SSH server to support remote access and it enforces compliance with the IBM Vulnerability Advisor. In contrast to the base image Liberty is run via supervisor.

As a result of this the logs from Liberty don’t show up by default (at this time) but only the logs of the supervisor. To fix this you can simply set an environment variable to point to additional log files. Read the documentation for details.

Via CLI:

cf ic run –env LOG_LOCATIONS=/opt/ibm/wlp/usr/servers/defaultServer/logs/messages.log –name ads-liberty -P registry.ng.bluemix.net/ibmliberty

Via UI:

After this, the logs of my Java code …

… show up in the dashboard:

As I’ve been told another solution is to create a new Dockerfile to update the supervisord configuration to redirect logs but I haven’t it yet.

Learn how moving from a traditional, on-premises delivery model to a cloud-based, software-as-a-service (SaaS) strategy is a high-stakes, bet-the-company game for independent software vendors. Brought to you in partnership with NuoDB.

ibm ,bluemix ,logging ,docker

Published at DZone with permission of Niklas Heidloff, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}