Download the PHP package ryunosuke/simple-logger without Composer

On this page you can find all versions of the php package ryunosuke/simple-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-logger

simple logger

Description

psr-3 を実装したシンプルなロガーパッケージです。 ストリームのみの実装ですが、php には強力な StreamWrapper があるので、(Wrapper があれば)実質的にあらゆる対象に書き込むことができます。

出力形式は拡張子で判断されます。

Install

Feature

(Wrapper があれば)あらゆる個所に出力できます。 例えば下記は S3 にログを出力します。

ただし、実際のところ(個人の観測範囲内では) file でスキームで書くことが最も多く、個人的にはログというものはファイルログ+fluentd さえあれば十分事足りると考えています(餅は餅屋に任せたい)。 StreamLogger は「与えられたパスが file:// である」という前提を置いていないだけ、という話です。

StreamLogger の他に ChainLogger というものがあります。 これはいわゆるコンポジットなロガーで、保持しているすべてのロガーにログを展開します。

つまり下記のようなことが可能です。 通常は notice 以上のログが path/to/log.jsonl に書き込まれますが、 error 以上は smtp スキームを通じてメール送信も行われます。

URL の機能面は下記のようになります。

monolog における Processer は Plugin 機構を用いています。 ログレベルによるフィルタや日時文字列の追加などはすべて Plugin として実装されます。 ロガーとしてはそれらの情報を一切特別扱いしません。

Plugins

上記の通り、StreamLogger はストリームへの抽象的な書き込みを担うだけでログの内容には一切の口出しをしていません。 出力形式は拡張子で制御しますが、出力内容については Plugin を設定することで制御します。

Note

出力は StreamWrapper の実装に強く依存します。これは特徴でもありますがデメリットでもあります。 例えば fopen の a フラグと相性の悪いミドルウェアも存在するため、全ログで flush するとか各ログで逐次 write するとか、細かな制御はこのパッケージ側では制御できません。 細かな制御のためには専用の StreamWrapper を書く必要があります。

License

MIT

FAQ

Release

バージョニングは romantic versioning に準拠します(semantic versioning ではありません)。

1.1.6

1.1.5

1.1.4

1.1.3

1.1.2

1.1.1

1.1.0

1.0.1

1.0.0


All versions of simple-logger with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
psr/log Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ryunosuke/simple-logger contains the following files

Loading the files please wait ....