Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2021-03-04 (1 month ago) | | Not yet rated by the users | | Total: 99 This week: 3 | | All time: 9,485 This week: 82 |
|
Description | | Author |
This class can log messages to given files.
It provides static functions to log messages either to the PHP error log or to a specific file in a given directory.
It may create the directory to store the log files, if the directory does not exist.
The class can check the values of certain constants to get the log file name, the destination directory for the log files or the text that may be used to divide the log messages. | |
|
Details
PHP LOG Class
Custom static class for register messages with simple methods.
INSTALLATION
With Composer
composer require danielriera/phplog
CONSTANTS
LOG_DEFAULT_FILE
Default file if $type is not defined, default: 'user'
LOG_FOLDER
Folder on put files, default: '/'
LOG_DIVIDE_ELEMENT
If defined divide files by $element, default: No defined
API
LOG::add(msg, element, type)
-
msg: String | Array | Object to register.
-
element: String or Integer id, default: false.
-
type: Type of log register, default: ``LOG_DEFAULT_FILE`` (user)
Example
LOG::add("Test Line");
LOG::add("Test User Line", 524);
LOG::add("Other User Line", 524);
LOG::add("Order Test Line", 'WEB581657816', 'order');
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.