PHPackages                             camspiers/silverstripe-csp-logging - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. camspiers/silverstripe-csp-logging

ActiveSilverstripe-module[Logging &amp; Monitoring](/categories/logging)

camspiers/silverstripe-csp-logging
==================================

Logs CSP violations through a logger

1113[3 PRs](https://github.com/camspiers/silverstripe-csp-logging/pulls)PHP

Since Feb 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/camspiers/silverstripe-csp-logging)[ Packagist](https://packagist.org/packages/camspiers/silverstripe-csp-logging)[ RSS](/packages/camspiers-silverstripe-csp-logging/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SilverStripe Content-Security-Policy Logging
============================================

[](#silverstripe-content-security-policy-logging)

[![Build Status](https://camo.githubusercontent.com/453768b29caa8ffd282ba524bb1871af582748485065badff8c3ce043e720fd6/68747470733a2f2f7472617669732d63692e6f72672f63616d7370696572732f73696c7665727374726970652d6373702d6c6f6767696e672e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/camspiers/silverstripe-csp-logging)

Allows the logging of CSP violations in SilverStripe

Installation (with composer)
----------------------------

[](#installation-with-composer)

```
composer require camspiers/silverstripe-csp-logging

```

Usage
-----

[](#usage)

Provide an instance of `Psr\Log\LoggerInterface` to the CSP controller:

1. Create a file called `mysite/_config/csp.yml` and add your logging service to the controller

```
Injector:
  Camspiers\CSP\Controller:
    constructor:
      0: %$Monolog
```

2. Set your Content-Security-Policy headers
3. Add "report-uri /csp-report/;" to the `Content-Security-Policy` header to log violations through SilverStripe

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/51294?v=4)[Cam Spiers](/maintainers/camspiers)[@camspiers](https://github.com/camspiers)

---

Top Contributors

[![camspiers](https://avatars.githubusercontent.com/u/51294?v=4)](https://github.com/camspiers "camspiers (7 commits)")

### Embed Badge

![Health badge](/badges/camspiers-silverstripe-csp-logging/health.svg)

```
[![Health](https://phpackages.com/badges/camspiers-silverstripe-csp-logging/health.svg)](https://phpackages.com/packages/camspiers-silverstripe-csp-logging)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M263](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M317](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
