PHPackages                             dawen/js-logger-bundle - 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. dawen/js-logger-bundle

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

dawen/js-logger-bundle
======================

A bundle that catches javascript errors and passes them to monolog for Symfony

1.0.0(10y ago)26.5k1[1 PRs](https://github.com/da-wen/js-logger-bundle/pulls)MITPHPPHP &gt;=5.5.0

Since Jan 25Pushed 8y agoCompare

[ Source](https://github.com/da-wen/js-logger-bundle)[ Packagist](https://packagist.org/packages/dawen/js-logger-bundle)[ Docs](https://github.com/da-wen/js-logger-bundle)[ RSS](/packages/dawen-js-logger-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

JsLoggerBundle
==============

[](#jsloggerbundle)

[![Build Status](https://camo.githubusercontent.com/15a74f1409ad3d29fb216fea4bb3c141132ebae4fe85d865cfbc653942ecc0e2/68747470733a2f2f7472617669732d63692e6f72672f64612d77656e2f6a732d6c6f676765722d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/da-wen/js-logger-bundle)

This JsLogger Bundle aims to catch error in the frontend and sending them to backend. All errors will be handled by a JsLogger Service that persists the log into a channel named *javascript*

---

Credits
-------

[](#credits)

Big thanks goes out to Bugsnag and Nelmio. Thanks for sharing the code that inspired me.

[Bugsnag Javascript](https://github.com/bugsnag/bugsnag-js)

[NelmioJsLoggerBundle](https://github.com/nelmio/NelmioJsLoggerBundle)

---

Installation
------------

[](#installation)

### Step 1: Composer

[](#step-1-composer)

Required in *composer.json*

```
   "dawen/js-logger-bundle": "~1.0"
```

### Step 2: AppKernel

[](#step-2-appkernel)

In your *app/config/AppHernel.php* file you should activate the bundle by adding it to the array

```
    $bundles[] = new \Dawen\Bundle\JsLoggerBundle\JsLoggerBundle();
```

### Step 3: Script

[](#step-3-script)

In your twig template you should place the twig method call before all your other javascript is initialized and before the closing body tag

```
    {{ js_logger() }}
```

Go ony with configuration section if needed.

---

Configuration
-------------

[](#configuration)

```
    js_logger:
        enabled: true
        allowed_levels: [warning, error]
```

If The configuration sections is not defined, default values will be applied.

### Parameter Description

[](#parameter-description)

*enabled:*

possible values: true, false default value: true description: If disabled, the JsLogger service will be removed from container and the JsTwigExtension will not dump the needed script tag

*allowed\_levels:*

possible values: emergency, alert, critical, error, warning, notice, info, debug default value: \[\] description: If an empty array is provided, there will be no restriction. You can restrict the logger pushing the logs to monolog, by setting values.

---

Developer Informations
----------------------

[](#developer-informations)

For installing and minifying the jslogger.js simply run from the bundles root path:

```
    npm install && npm run build
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3808d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b17b667470ade8c9d55149a52be13fae8313bd8e182a68a80d6e7d819473780e?d=identicon)[dawen](/maintainers/dawen)

---

Top Contributors

[![da-wen](https://avatars.githubusercontent.com/u/3296502?v=4)](https://github.com/da-wen "da-wen (8 commits)")

---

Tags

symfonyjavascriptloggermonolog

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dawen-js-logger-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dawen-js-logger-bundle/health.svg)](https://phpackages.com/packages/dawen-js-logger-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k8.7k1](/packages/kimai-kimai)[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29734.8k](/packages/sulu-skeleton)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M524](/packages/shopware-core)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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