2017 © Pedro Peláez
 

library x-phalcon-logger

Phalcon Logger 工厂类

image

limingxinleo/x-phalcon-logger

Phalcon Logger 工厂类

  • Tuesday, April 24, 2018
  • by limingxinleo
  • Repository
  • 1 Watchers
  • 5 Stars
  • 2,452 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 36 % Grown

The README.md

X-Phalcon-Logger

Build Status, (*1)

安装

composer require limingxinleo/x-phalcon-logger

使用

<?php

use Xin\Phalcon\Logger\Factory;
use Phalcon\Config;
use Phalcon\Logger\Formatter\Line;
use Xin\Phalcon\Logger\Sys;

// 初始化工厂
$config = new Config([
    'application' => [
        'logDir' => __DIR__ . '/../logs/',
    ],
]);

$factory = new Factory($config);

$context = [
    'dir' => 'test' // 如果不设置子目录,则根据日期分目录
];

// 获取单例日志实例
$logger = $factory->getLogger('info', Sys::LOG_ADAPTER_FILE, $context);
// 设置格式化
$formatter = new Line("[%date%][%type%] %message%", "Y-m-d H:i:s");
$logger->setFormatter($formatter);

// 写入日志
$logger->info('日志数据');

The Versions

24/04 2018

dev-master

9999999-dev

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

24/04 2018

1.0.4

1.0.4.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

03/04 2018

1.0.3

1.0.3.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

08/02 2018

1.0.2

1.0.2.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-phalcon ^3.0

 

The Development Requires

by 李铭昕

04/12 2017

1.0.1

1.0.1.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-phalcon ^3.0

 

The Development Requires

by 李铭昕

18/10 2017

1.0.0

1.0.0.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-phalcon ^3.0

 

The Development Requires

by 李铭昕

21/09 2017

0.0.1

0.0.1.0

Phalcon Logger 工厂类

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-phalcon ^3.0

 

The Development Requires

by 李铭昕