PHPackages                             xaraya/logconfig - 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. xaraya/logconfig

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

xaraya/logconfig
================

Module for Configuration the Logging System

2.9.4(6mo ago)01191GPL-2.0-or-laterTwig

Since May 25Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/xaraya-modules/logconfig)[ Packagist](https://packagist.org/packages/xaraya/logconfig)[ Docs](https://github.com/xaraya-modules/logconfig)[ RSS](/packages/xaraya-logconfig/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (8)Used By (1)

Overview
--------

[](#overview)

### What is it?

[](#what-is-it)

The LogConfig module lets you configure the Xaraya logging system. It is essentially a wrapper for the logging parts of the configuration files found at

- var/config.system.php
- var/logs/config.log.php

In other words, anything this module does can be done by directly editing those two files. Nonetheless, unless you know what you're doing, using this module to configure logging is the recommended way to go.

### How to use it?

[](#how-to-use-it)

You can:

- List the loggers that are currently configured. From here you can then edit the settings for each logger, including whether or not it is active. Note that an active logger will not do anything until you enable loggind in the modifyconfig page (see below).
- Turn Xaraya logging on/off globally. This makes Xaraya log (or not) according to the loggers configured. This setting in the modifyconfig page is identical to the setting found under the logging tab in the modifyconfig page of the base module. The latter can be found here.

The loggers are shipped with the Xaraya core and are located in lib/xaraya/log/loggers. You can, of course, run several loggers simultaneously, but be aware that this many degrade performance, not to mention using up disk space faster for loggers that write to disk or database.

The logging system depends on the timezone settings found here. You should set the Host Timezone to the timezone you want the timestamps of the logged messages to show.

### Fallback System:

[](#fallback-system)

If logging is set to on in this module and none of the loggers are active, then there is a fallback system that will log to a text file. This fallback can be configured under the logging tab in the modifyconfig page of the base module, found here.

### Message levels

[](#message-levels)

The Xaraya loggers recognize the following message levels. Each logger can be configured to track one or more of these message levels.

NameNumeric ValueApplicationEMERGENCY1Tracks errors that call for immediate interventionALERT2Tracks errors that call for interventionCRITICAL3Tracks errors that result in major consequences for processingERROR4Tracks behavior that is unexpected or undesired, with minor consequences for processingWARNING5Tracks anomalities or abnormal behavior without consequences for processingNOTICE6Tracks high level core processes and main module processesINFO7Tracks low level core and module processesDEBUG8Used for fine grained debugging### Available loggers

[](#available-loggers)

- The errorlog logger: writes log data to the web server's error log
- The html logger: writes log data to an HTML file
- The javascript logger: opens a debug window with the log information
- The mail logger: sends log data to a recipient via email
- The mozilla logger: opens a debug window with the log information
- The simple logger: writes log data to a text file
- The sql logger: writes log data to a database table
- The syslog logger: write log data to server logs

The loggers are all subclasses of a parent xarLogger class, found at lib/xaraya/log/loggers/xarLogger.php. This class is responsible for:

- Defining the log message levels that Xaraya uses (see above)
- Defining the timestamp formats that are used in displays.
- Creating a unique universal identifier (UUID) based on PHP's random\_bytes function. This is used by several of the loggers to differentiate between one pageview and the next.

### Notes on the errorlog logger

[](#notes-on-the-errorlog-logger)

This logger writes to PHP's error log, which can be accessed by the PHP funcion error\_log(), as described [here](https://www.php.net/manual/en/function.error-log.php).

### Notes on the mail logger

[](#notes-on-the-mail-logger)

The mail logger will send you an email with the error message and some additional information. You cannot edit the lay-out and content of the message via the mail templates as the message is created by PHP code.

Because of the vagaries and continuously changing (improving) standards for email and the major email providers, it is recommended that you first test Xaraya's email functionality in your environment and make sure everything works. You can do this by sending test messages from the mail module. Helpful information can also be had by setting the mail module's debug functionality, which is found on the mail module's modifyconfig page here.

### Notes on the SQL logger

[](#notes-on-the-sql-logger)

The SQL logger needs a database table to write its data to. This table should be added to your database. For MySQL you can use the following code:

```
                CREATE TABLE `xar_log_messages` (
                  `id` int(10) NOT NULL,
                  `ident` varchar(32) NOT NULL,
                  `logtime` varchar(255) NOT NULL DEFAULT '',
                  `priority` tinyint(4) NOT NULL DEFAULT '0',
                  `message` text NOT NULL
                  PRIMARY KEY  (`id`)
                );

```

The SQL logger will log all messages to this database table. Currently, there is no interface to manage the entries. In configuring this logger, make sure that your entry for the SQL Table parameter corresponds to the name of the database table you have created.

### Notes on the syslog logger

[](#notes-on-the-syslog-logger)

Depending on its configuration, this logger writes to a server log. as described [here](https://www.php.net/manual/en/function.syslog.php). It should be noted that different server operating systems have different types of logs. We make no claims about which of this loggers configurations will work in any given case.

### Further Information

[](#further-information)

To be added on occasion!

\*\* LogConfig Module Overview\*\*
 Version 1.0.0 2022-5-01

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance66

Regular maintenance activity

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~216 days

Recently: every ~76 days

Total

7

Last Release

200d ago

Major Versions

1.0.0 → 2.6.02025-01-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1447115?v=4)[Mike's Pub](/maintainers/mikespub)[@mikespub](https://github.com/mikespub)

---

Top Contributors

[![mrvdb](https://avatars.githubusercontent.com/u/73067?v=4)](https://github.com/mrvdb "mrvdb (48 commits)")[![mikespub](https://avatars.githubusercontent.com/u/1447115?v=4)](https://github.com/mikespub "mikespub (36 commits)")[![xaraya](https://avatars.githubusercontent.com/u/4238479?v=4)](https://github.com/xaraya "xaraya (17 commits)")[![random777](https://avatars.githubusercontent.com/u/4590892?v=4)](https://github.com/random777 "random777 (13 commits)")

### Embed Badge

![Health badge](/badges/xaraya-logconfig/health.svg)

```
[![Health](https://phpackages.com/badges/xaraya-logconfig/health.svg)](https://phpackages.com/packages/xaraya-logconfig)
```

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

1941.5M274](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M338](/packages/open-telemetry-sdk)

PHPackages © 2026

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