Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uzulla/slog.php

Singleton and Simple, PSR-3 Logger Container
https://github.com/uzulla/slog.php

Last synced: about 1 month ago
JSON representation

Singleton and Simple, PSR-3 Logger Container

Awesome Lists containing this project

README

        

SLog.php
=======

Singleton and Simple, PSR-3 Logger Container

WHY?
========

I want use something like a Object::Container(perl).

and, some convinience feature.

SYNOPSIS
========

## setup

Sample using monolog.

```php
pushHandler(new \Monolog\Handler\StreamHandler(__DIR__.'app.log', \Monolog\Logger::DEBUG));
\Uzulla\SLog::setLogger('APP', $app_log);
```

## use

```php
debug('debug me!!');
//or
L::getLogger('APP')->info("log!", ['why'=>'kantanbenri']);
```

KANTANBENRI
=========

```php
info("uhoh!");
```

this is usable in haste.(but not smart)

Simple Logger
=============

This library contain simple PSR-3 Logger `\Uzulla\SLog\SimpleLogger`.

```php
alert('ALERT!!!');
```

That use error_log(). unless setting log filename.

LICENSE
=======

MIT