Server logs

The logs for each environment are collected and stored in a centralised installation of Graylog.

You can access Graylog using your log-in at the following URL: https://logs.cwp.govt.nz/

We provide a stream for each environment. Streams are where you can view and query the stored logs. These include 

  • Apache
  • PHP
  • Email logs
  • any custom events that you want to log

Logging custom events

The recipes are configured to send all logs to syslog, which are then accessible through Graylog. The recommended way to log events is through the Silverstripe logging API:

use Psr\Log\LoggerInterface;
use SilverStripe\Core\Injector\Injector;

// ...

Injector::inst()->get(LoggerInterface::class)->notice('Something seems to have happened');

For more information on the general usage of the Framework's logging subsystem, see the logging in Silverstripe documentation.

Custom audit trail

Aside from regular logs, you can add custom events to the audit trail. Please follow the instructions provided with the silverstripe/auditor module.

Was this answer helpful? Yes No

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