-
-
Notifications
You must be signed in to change notification settings - Fork 20
Working with log files
When debugging core or custom code you want to keep an eye on the log files. They help you understand what is going on.
Make sure that your config.php
file contains the following two lines:
public $debug = '1';
public $log_level = 'debug';
The first line turns on debug mode which, among other things, displays an informative exception page (using Symfony ErrorHandler) and creates a debug.log
file with very detailed debugging information.
The second line changes the default log level from warning
(warnings and errors) to debug
(debug, information, notices, warnings, and errors). This gives you a better picture of what is happening.
All log files except the debug.log
have the following format:
timestamp | level | message | context | extra
The debug.log
has the following format:
timestamp | level | category | message | context | extra
The timestamp is the date and time of the log message in the format Year-Month-Date Hour:Minute:Second.Millisecon Timezone
. The timezone of the log file is whatever your PHP installation is configured to use by default, see date.timezone
in your php.ini
file.
The level is one of the log message severity levels: debug, info, notice, warning, error, critical, alert, emergency. Panopticon uses the first six levels.
The category is the log file category. Remember, the debug.log
file is a combination of all log sources, that's why it needs that. As far as the other log files are concerned, they're filename is the category.
The message is, of course, the message being written to the log.
The context and extra fields contain additional variables passed by the code to provide better context on the message. The extra field is not used by default, but can be used by custom (user) code.
The following log categories exist in Panopticon:
-
extensionsupdate
Updating Joomla! extensions. This is the main log file for all updates. Each site generates its own log file, e.g.extensionsupdate.2
for the site with an ID of 2. -
extensionupdatesdirector
. The task which schedules automatic Joomla! extension updates. -
joomlaupdate
. Updating Joomla! itself. This is the main log file for all updates. Each site generates its own log file, e.g.joomlaupdate.2
for the site with an ID of 2. -
joomlaupdatedirector
. The task which schedules automatic Joomla! updates. -
maxexec
. The benchmarking task which determines the maximum execution time for tasks. It normally only runs when setting up Panopticon. -
refreshinstalledextensions
. The task which refreshes the information about installed updates on Joomla! sites. -
refreshsiteinfo
. The task which refreshes the information about the Joomla! update status and the PHP version of a site. -
sendmail
. The task which sends enqueued email messages.
If you are using a JetBrains integrated development environment (IDE) such as PhpStorm, or Fleet, you can use the Ideolog plugin to more easily work with the log files.
You will need to go to your editor's Settings, Editor, Log Highlighting (Ideolog) and make the following changes.
Add the first log format:
- Name: Panopticon with Category
- Message pattern:
^(\d+-\d+-\d+\s+\d+:\d+:\d+(.\d+)\s\w+)\s*\|\s*(\w+)\s*\|\s*([^|]*)\s*\|\s*([^|]*)\s*\|\s*([^|]*)\s*\|(.*)$
- Message start pattern:
^\d
- Time format:
yyyy-MM-dd HH:mm:ss,SSS
- Time capture group: 1
- Severity capture group: 2
- Category capture group: 3
- Apply message pattern to all message lines: not checked
Add the second log format:
- Name: Panopticon without Category
- Message pattern:
^(\d+-\d+-\d+\s+\d+:\d+:\d+(.\d+)\s\w+)\s*\|\s*(\w+)\s*\|\s*([^|]*)\s*\|\s*([^|]*)\s*\|(.*)$
- Message start pattern:
^\d
- Time format:
yyyy-MM-dd HH:mm:ss,SSS
- Time capture group: 1
- Severity capture group: 2
- Category capture group: 0
- Apply message pattern to all message lines: not checked
Add (?i)
in front of all patterns.
Now Ideolog can analyse Panopticon's log files.
Documentation Copyright ©2023–2024 Akeeba Ltd.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
You can also obtain a copy of the GNU Free Documentation License from the Free Software Foundation
- Overview pages
- Working with sites
- Site Overview
- Backup Management with Akeeba Backup Pro
- Security Management with Admin Tools Pro
- Scheduled Update Summary
- Scheduled Action Summary
- Backup Tasks
- Scanner Tasks
- System Configuration
- Managing Sites
- Mail templates
- Users and Groups
- Tasks
- Log files
- Update Panopticon
- Database Backups
- Fixing your session save path
- The .htaccess file
- Advanced Customisation (user code)
- Plugins
- Custom CSS
- Custom Templates
- Advanced Permissions
- .env For Configuration