Just like me, you may have been puzzled by a recent change in Bluemix: some log files are no longer accessible.
To develop and test my sample applications, I often send messages to the default console. For instance, for new Node.js features, I add a simple line of code such as: console.log("here is my message for test and debug"); Until recently, the corresponding message was added to the stdout.log file, and accessible from Bluemix. I know it is not ideal, but it is quick and does the trick for simple debug purposes.
Earlier this month, I was testing some new code in my DevOps Services project. I deploy to Bluemix, I click the link to the logs to examine the files, and... surprise!..... my usual logs are no longer here. Where are the stdout.log and stderr.log files? .....I now only have access to two log files: env.log and staging_task.log.
At first, I thought about a temporary DevOps Services problem. So I opened the Bluemix dashboard for other apps, and unfortunately, I noticed that the available log files were the same: After some research, I discovered that Bluemix/CloudFoundry has changed the way it manages logs. The stdout.log and stderr.log files are no longer accessible. Of course, I could write a custom logger to a file in Node.js, but I want to leverage everything that is available to me if it reduces my amount of work.
And Bluemix provides a new simple yet very powerful option: Monitoring and Analytics.
In just a few click, you can connect the Monitoring and Analytics add-on to your existing applications. You just need to add it to your environment from the Bluemix catalog. No code needed, no cumbersome configuration, no change to your app. It is effortless.
Once Monitoring and Analytics is associated to your application, you have access to additional dashboards check availability over time, but also examine your application performance. And you have a whole section to inspect logs. The Monitoring and Analytics add-on is quite powerful to diagnose problems in your application. You can also connect the add-on to many Bluemix apps, which gives you an easy and centralized monitoring tool for all your deployed applications.
If the stdout.log file is no longer accessible in Bluemix logs, we now have access to a much powerful yet easy to use add-on to examine applications. And it only takes a minute to add it to your environment. For further information on this new capability, go to the Monitoring and Analytics page.