Server logs

All Cloud environments send their webserver, system and application logs to a centralised location. These logs are then accessible for several weeks through the Graylog application.

You can access Graylog using your Cloud username (see your profile) and password, at the following URL:

A Graylog “stream” is provided for each environment you have access to. Streams are filtered views that include only messages coming from one specific environment: they include messages from all web servers, even those that have been cycled out due to autoscaling events or deployments.

Information that can be found in the logs includes, but is not limited to:

  • PHP errors
  • Email logs
  • Apache and nginx access and error logs
  • Custom logs written by the application via SS_Log

Cloud provides a shortcut link to environment streams too: pick your project from the list and click the “Server logs” link next to the environment.


For an easy start, there is a dropdown with predefined searches in the top-right corner of the Graylog interface. As an example, pick “PHP errors” to see the recent errors on your environment.

To execute a custom search, provide time period and query string. The query string uses Graylog’s query syntax.

Finding virtual environment logs

When using virtual stacks, any virtual environment server logs are placed into the same Graylog stream as the base environment where the virtual stack was created.

A field in Graylog called virtual_id can be used to filter the logs to specific virtual environments. For example, this query will only show demosite logs:


Logging custom events

In addition to the standard logging events from Apache, PHP etc, you may wish to send some of your own messages to Graylog. Sending custom messages to Graylog from different execution paths in your codebase can be key in debugging bugs or other issues.

Logging custom events in Silverstripe CMS 4.x

Create a new yml file in your _config directory, for most applications this will be in app/_config, with the following content:

Name: sysloglogging
      pushSilverStripeSyslogHandler: [ pushHandler, [ '%$Monolog\Handler\HandlerInterface.silverstripe' ] ]
  # Internal error handler, piped to syslog which is routed to Graylog
    class: Monolog\Handler\SyslogHandler
      - 'SilverStripe_log'

You can now follow this guide to send custom messages to Graylog.

For more information, see logging in Silverstripe CMS documentation.

Logging custom events in Silverstripe CMS 3.x

The following code in your mysite/_config.php will configure SS_Log to send events to the syslog of the server, which will then be forwarded to Graylog:

if (defined('AWS_SYSLOG_LEVEL')) {
    $sysLogWriter = new SS_SysLogWriter('SilverStripe_log', LOG_PID);
    SS_Log::add_writer($sysLogWriter, (int) AWS_SYSLOG_LEVEL, '<=');

Now when you call SS_Log::log() the event will be pushed to Graylog:

SS_Log::log('Something seems to have happened', SS_Log::DEBUG);

You may wish to create your own subclass of SS_LogErrorFileFormatter to format the specific log line that will be sent.

For more information, see logging in Silverstripe CMS documentation.

Was this answer helpful? Yes No

Sorry we couldn't be helpful. Help us improve this article with your feedback.