2017 © Pedro Peláez
 

craft-plugin loghelper

Log Helper Plugin for Craft CMS

image

nerds-and-company/loghelper

Log Helper Plugin for Craft CMS

  • Thursday, February 23, 2017
  • by nerds-and-company
  • Repository
  • 3 Watchers
  • 11 Stars
  • 8,844 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

Log Helper plugin for Craft CMS

Introduction

When logging events and errors, Craft CMS writes to the craft/storage/runtime/logs/craft.log. and craft/storage/runtime/logs/phperrors.log files., (*1)

This can cause problems on hosting environments that have an ephemeral filesystem (like Heroku, Amazon EC2 and some Docker configurations) as the log files will not be persisted and logging data will get lost., (*2)

This plugin adds the ability to Craft CMS to redirect logging output to other sources than the default log files., (*3)

Installation

This plugin can be installed manually or using Composer., (*4)

Composer

The preferred means of installation is through Composer:, (*5)

composer require nerds-and-company/loghelper

This will add nerds-and-company/loghelper as a requirement to your projects composer.json file and install the plugin into the craft/plugins/loghelper directory., (*6)

Manual

If installation through Composer is not an option, the package can also be installed manually. Download the latest release or clone the contents of this repository into the craft/plugins/loghelper directory., (*7)

Important:, (*8)

The plugin's folder must be named "loghelper", (*9)

Usage

This plugin offers different types of behaviour that can be configured by editing/adding the craft/config/logHelper.php config file., (*10)

Configuration

The following settings are available:, (*11)

useFileLog

Accepts true or false
Default true
Since v2.0.0

Determines whether logs should be written to file or not. This allows for disabling Craft's default behaviour., (*12)

'useFileLog' => true,

useProfileLog

Accepts true or false
Default true
Since v2.0.0

Determines whether or not to displays profiling results in the browser's console window. This allows for disabling Craft's default behaviour., (*13)

'useProfileLog' => true,

useStdErrLog

Accepts true or false
Default false
Since v2.0.0

Determines whether logs should be written to STDERR (shell error output stream) or not. Enabling this allows for viewing Craft logs on Heroku (or in tools that persist Heroku logs, like Papertrail)., (*14)

'useStdErrLog' => false,

useSysLog

Accepts true or false
Default false
Since v2.0.0

Determines whether logs should be written to the system logs or not. Enabling this allows tools that read from the system logs (like Papertrail when not on Heroku) to persist Craft logs., (*15)

'useSysLog' => false,

useWebLog

Accepts true or false
Default true
Since v2.0.0

Determines whether or not to displays log content in the browser's console window. This allows for disabling Craft's default behaviour., (*16)

'useWebLog' => true,

Screenshots

Docker

Docker, (*17)

Heroku

Heroku, (*18)

Papertrail

Papertrail, (*19)

License

This plugin has been licensed under the MIT License (MIT). Please see License File for more information., (*20)

Changelog

2.0.3

  • Better log processing

2.0.2

  • Fixed bug with reading default config values

2.0.1

  • Adds more documentation

2.0.0

  • Adds support for syslog logging, which is the default for Papertrail (non-Heroku)
  • Adds the ability to remove web, file and profile logging
  • Improves readability of the logs by appending newlines

1.0.0

  • Initial release

The Versions

23/02 2017

dev-master

9999999-dev

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

23/02 2017

dev-develop

dev-develop

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

23/02 2017

2.0.3

2.0.3.0

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

12/04 2016

2.0.2

2.0.2.0

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

31/03 2016

2.0.1

2.0.1.0

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

26/01 2016

2.0.0

2.0.0.0

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires

 

08/01 2016

1.0.0

1.0.0.0

Log Helper Plugin for Craft CMS

  Sources   Download

MIT

The Requires