Download the PHP package opxcore/log-manager without Composer

On this page you can find all versions of the php package opxcore/log-manager. 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 log-manager

Log manager

Build Status Coverage Status Latest Stable Version Total Downloads License

Log manager is package to handle multiple loggers. All write (send or something else) logic and message formatting must be implemented in these loggers. Log manager is only resolves which logger will be used and fires log action for corresponding logger.

Each logger must implement Psr\Log\LoggerInterface .

Installing

Basic creating:

Creating with container

or

Configuring and using

Configuration array consists of three keys. Value of 'default' must contain a name (or array of names) of logger to be used as default logger. 'loggers' is a set of loggers to be used keyed by name. A required parameter of each logger is a 'driver' containing class name of logger to be used with corresponding name (see examples below). Third additional key 'groups' contain array of logger groups keyed by name of group.

Log manager extends container, so loggers will be resolved by it with all dependency injections. All loggers will be resolved on demand and instanced for future use. All parameters except 'driver' will be passed to logger constructor as parameters.

Additionally, you can bind custom created logger:

To get a certain logger call method $manager->logger($name) where $name is name of logger to be returned. If null given the default logger (or several loggers) will be used.

To get multiple log loggers use same method with an array of names $manager->logger([$name1, $name2])

In both cases LoggerProxy class with chosen loggers bindings will be returned, so $manager->logger([$name1, $name2])->log($message) will call log action on each of logger.

To use group logging use $manager->group($group) or $manager->group([$group1, $group2]). Each group will be resolved to set of loggers and then merged together, removing duplicates.

PSR-3

Log manager implements PSR-3. So available methods are:

These methods will call corresponding method of default logger(s).

Examples

Log manager configuration:

Logger class:

Calling $manager->logger('file') at first time will create and return LogFile class instance (for this example is equal to new \OpxCore\Log\LogFile('/www/project/logs')) and store it's an instance for future use. So calling $manager->logger('file') for second time will return same instance of logger.

For this example using

is equal to (as 'file' set as default logger)

and equal to


All versions of log-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
opxcore/log-interface Version ^1.0.8
opxcore/log-manager-interface Version ^1.0.0
opxcore/container Version ^1.0.3
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 opxcore/log-manager contains the following files

Loading the files please wait ....