AlexKratky/LoggerX


License: MIT

Language: PHP


LoggerX

Class to work with logs.

Installation

composer require alexkratky/loggerx

Logging the data

Writing data to log using panx-framework is quite easy. All you need to do, is calling function Logger::log($text, $file), where $text is the text that you want to log and $file is the name of log. The second parameter is optional, and if you do not pass any data, Logger Class will use main.log as default log file name.

This function returns the number of bytes that were written to the file, or FALSE on failure. So if you want to check, if the data was written successfully, you can do it by:

if(Logger::log("text") !== false) {
    // data was written successfully
} else {
    // data was not written successfully
}

Project Statistics

Sourcerank 3
Repository Size 2.93 KB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 2
Contributors 1
Tags 1
Created
Last updated
Last pushed

Top Contributors See all

Alex Krátký

Packages Referencing this Repo

alexkratky/loggerx
Class to easy work with logs.
Latest release v0.1.0 - Published

Recent Tags See all

v0.1.0 September 13, 2019

Something wrong with this page? Make a suggestion

Last synced: 2019-09-14 06:16:59 UTC

Login to resync this repository