We would like a github repository to include deployment configuration of a WordPress blog. We would like to run an instance of this deployment on a Google Container Engine / Kubernetes. In fact, we would like to run two instances, a pre-prod instance matching the master branch of the deployment configuration. We would like the operated deployment instances to automatically update when we commit to the configuration repository.
Recently, we’ve tested using MongoDB for a lot of different purposes. This article gives an example of how to log to MongoDB from PHP.
First, a very basic logging class written in PHP:
To do logging from your code, you simply do So_log::debug(message, object);:
You may easily access your logs through the Mongo shell, however it might be convenient to write your own customized tool to tail the logs. Yoy may extend the tools to give more advanced filtering and presentation options.