reflic/na-logger
Composer 安装命令:
composer require reflic/na-logger
包简介
Simple feature-supporting (categories) Logging for PHP.
关键字:
README 文档
README
Usage
Directly
Download the src/ directory and place it into your working directory.
then include the file naLogger.php
<?php require 'src/naLogger.php'; ...
With Composer
Create a composer.json with this content:
{
"require": {
"reflic/na-logger": "v1.0.0"
}
}
If you already have a composer.json add this to the require section: "reflic/na-logger": "v1.0.0
Then to autoload the libary add this to your main PHP file. (In most frameworks like Laravel or Symfony this file is already loaded.)
<?php require 'vendor/autoload.php'; // Create the log object. $logger = new naLogger('etc/log.txt', naLogger::DEBUG); // Log some messages. $logger->logEmerg('Database crashed.', 'Database'); $logger->logAlert('Loadtime over 5s!', 'Server'); $logger->logNotice('User Login failed.', 'User'); $logger->logInfo('Cronjob "test" started.', 'Cronjob'); $logger->logDebug('User-Hash: 838hshf82bd01()', 'Usermodule');
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-04-10