Monolog Logging Service

Monolog Logging Service 5.0.4

No permission to download
Nothing new from 5.0.3 - just cleanup, no need to install

5.0.4 (2026-10-13)​

  • new: declares the Slack webhook as a secret through the hampel_admin_api_redaction code event, for an add-on that reports a forum's configuration with secrets removed
  • the add-on's description in the admin panel now says what it does

5.0.3 (2026-10-09)​

  • documentation changes only; no change in behaviour

5.0.2 (2026-10-08)​

  • new: monolog:validate --strict exits 2 when there are warnings and no failures — for a monitor; 1 still means a failure, and without the flag nothing changes
  • monolog:validate warns when the log file, email and Slack are all off, where it used to report the empty logger as fine
  • monolog:validate checks that email and Slack can record what they have sent, and warns if not — without that record every repeat is sent again
  • every record monolog:validate and the Test Monolog page write carries probe: true in its context, so an alert over the log can leave them out

5.0.1 (2026-10-04)​

  • fix: email and Slack treated two different errors with the same message as a repeat, and suppressed the second — a repeat now also has to match the channel and, where the record has one, the exception or a fingerprint in its context
  • every message this add-on writes to the server error log now begins Monolog:

5.0.0 (2026-10-02)​

  • new: channel() returns a PSR-3 Psr\Log\LoggerInterface for an add-on's own log channel — type against that interface, not a Monolog class
  • deprecated: newChannel(), now an alias for channel(), and the static Hampel\Monolog\Helper\Log
  • removed: logger(), default(), stream() and visitor() — add or replace handlers and processors with the new hampel_monolog_setup code event instead
  • new: post log records to Slack through an incoming webhook — one message per request, sent with a short timeout, and a failed post never reaches the add-on that was logging
  • new: every option can be set in $config['monolog'] in config.php — file, email and slack sections, request_id, visitor, web and site — and the options page shows it as set there; handlers, processors and a file formatter add to the stack with no add-on
  • new: a minimum level per channel in config.php, so one add-on can be traced at Debug without turning up every other
  • new: Log File Format, Site Name and Add Request ID options; every record carries a request id, the web server's where it provides one
  • new: monolog:config and monolog:validate CLI commands — what is configured, and whether it works, with --unattended for a deploy gate
  • new: JSON records carry extra.site, extra.app and extra.schema
  • new: README guidance on choosing log levels, and on supporting 4.x and 5.x from another add-on
  • security: the log file option only accepts a path inside internal_data — a path outside it is ignored, and belongs in config.php
  • fix: email alerts were switched on by a fresh install until the options were saved — such installs stop emailing until email is enabled
  • fix: creating a log channel no longer builds XenForo's mailer, which could recurse with a mail add-on that logs
  • email is sent through XenForo's own mail system, on 2.2 and 2.3 alike
  • runs on Monolog 3 as well as 2
  • requires XenForo 2.2 and PHP 7.4

4.1.2 (2025-12-12)​


  • run enqueuePostUpgradeCleanUp during upgrades if we're running XF2.3+
  • latest composer dependencies
Minor bugfix to explicitly enforce admin permissions on admincp tools
v4 implememts Monolog v2

Important to note is that the default date format in logs has changed for v2 - but for backwards compatibility I have reset the date format to that used by v1.

There is no new functionality in this version.

If you need Monolog v1 support - stay on the 3.x version of this addon - I will maintain that version for critical bugfixes.
XenForo v2.2 moved to Swiftmailer v6 - this addon release maintains compatibility across both XF 2.1 and XF 2.2

Addon now works on both XF 2.1 and XF 2.2
  • Like
Reactions: yin9
  • updates for XF 2.1
I am changing the structure of the addon_id I use for my addons - so this version is a re-release of the functionality currently available in v2.1.1, but with a new addon_id.

Note that you cannot directly upgrade from v2.1.1 - there are additional manual steps required - please see upgrade instructions below.

If you don't yet have v2.x installed, just install v3.x as you would normally do for any addon. If upgrading from v2.x of the addon, follow the instructions below.

Upgrade instructions from v2.x of the addon (read this in full before starting!):

A) Easy upgrade from v2.x - lose option configuration

If you don't mind reconfiguring the addon options - you may simply uninstall the existing addon (and remove the files from the file system!) and then install this new v3.x version

B) Full upgrade from v2.x - retain cached data and option configuration

To retain all cached data and configuration settings, carefully follow these steps (caution - doing these in the wrong order or missing a step can lead to data loss!):
  1. back up your forums (both database and file system) before attempting to upgrade - you could lose data if you get the steps wrong!
  2. it is highly recommended that you close your forums before starting the upgrade process
  3. In your favourite database browser tool, locate the xf_addon table for your forum installation and then find the row with the addon_id = Monolog
  4. Change the is_legacy field for this row and set the value to 1. This will mark the addon as "legacy" in the admin UI and disable the addon
  5. Extract the new v3.0.x addon to the file system. It won't over-write the existing addon installation because of the change in addon_id
  6. Refresh the addon list in the UI - the system should offer to upgrade the addon instead of installing it, having detected that the old addon is the "legacy" version
  7. Proceed with the upgrade - all data and option settings will be retained, the old addon will be uninstalled and show up in the admin UI as "Installable". Do NOT re-install the old addon!
  8. Remove the old addon files from the file system completely - these can be found in <forum_root>/src/addons/Monolog
  9. Test that the new version of the addon works - look for the test suite in the Tools section of the admin UI
  • was using the wrong subcontainer name
  • move subcontainer out of XF namespace
  • bump version_id to 2004 to avoid conflicts with XF 1.x compatible releases
Back
Top Bottom