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 today

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 19% 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://www.gravatar.com/avatar/91d02ba78b01d0432821f6195f11d6b95aa8da31f02f8aaea7a2e7215662061a?d=identicon)[camspiers](/maintainers/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.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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