Download the PHP package bvdputte/kirby-log without Composer

On this page you can find all versions of the php package bvdputte/kirby-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby-log

Kirby log plugin

A little log utility you can use with Kirby CMS. It's a wrapper around KLogger.

Installation

Usage

By default, all kirby system exceptions are logged to site/logs/kirbylog.log.
(Can be disabled via 'bvdputte.kirbylog.exceptionlog' => false in config.php.

Logging API:

Default usage

💡 The logfile will be created automatically when not existant.

Define the loglevel

As defined by PSR-3, you can pass the wanted loglevel as the second argument in the ->log() method:

💡 By default the loglevel is info. This can be set in the options.

Log variables to log

AppendContext can be interesting to include variables to your log.

Customize the logger

API:

1. Custom log name

2. Extended options for the logger

Several extended options are available:

Pass them as follows to the logger using an associative array:

More info on KLogger docs.

Kirby configurable options

  1. The default location where logfiles will be saved is the Kirby default logs location: /site/logs/. You can change this locaction via the custom folder setup and then change the logs root.
  2. The default logname is kirbylog.log. Change it in config.php via 'bvdputte.kirbylog.logname' => 'custom-logname.log'.
  3. The default loglevel is info. Change it in config.php via 'bvdputte.kirbylog.defaultloglevel' => 'debug'. Be sure to use a valid PSR-3 loglevel.
  4. 'bvdputte.kirbylog.rotateLogs' => true: log rotation is on by default when logs get bigger then 10MB. Set to false to disable logrotation
  5. 'bvdputte.kirbylog.rotateLogSizeThreshold' => '10MB' // can be in 'B', 'KB', 'MB' or 'GB': the size-based threshold for logrotation. Defaults to 10MB

Disclaimer

This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.

License

MIT

It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.


All versions of kirby-log with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
katzgrau/klogger Version ^1.2.2
studio24/rotate Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bvdputte/kirby-log contains the following files

Loading the files please wait ....