Skip to content

Ashterix/log-to-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Log to file

Easy logging to file.

Requirement

  • PHP >= 5.4
  • "ufo-cms/file-system": "dev-master"

Installation

Via Composer:

require "ashterix/log-to-file": "dev-master"

Usage

use LogToFile\Logger;

$log = new Logger('MyLog.log');

$log->write("First message", "Start program");

// do something
// ...

$log->write("Second message", "Log point");

// do something
// ...

$log->write("Program finish");

If you don`t write filename, lib create log file with current date name

// Current date: 2015-03-16
$currentDateLog = new Logger();
$log->write("Something");

// This construct create file "2015-03-16.log"

License

This library is available under the MIT license.

About

Easy loging to file

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages