ralphhortt/anni-client

我的Anni日志平台的自定义客户端

0.1 2020-03-23 20:41 UTC

This package is auto-updated.

Last update: 2024-09-25 07:09:16 UTC


README

我的Anni日志平台的自定义客户端

安装

composer require ralfhortt/anni-client

使用

<?php
use \Anni\Connect;

# Open a connection
\Anni\Connect::to('https://anni.acme.io/sample-project/production/jNsVwMbyXO27uxZw');

# Log to Anni
\Anni\Info('Retailer importer', 'Starting');
\Anni\Critical('Retailer importer', 'No log file found', ['url' => $importUrl]);
\Anni\Debug('Retailer importer', 'Retailer importer');
\Anni\Notice('Retailer importer', 'Missing data in retailer');
\Anni\Warning('Retailer importer', 'Could not generate latitude/longitude of retailer');
\Anni\Error('Retailer importer', 'Failed to import retailer');
\Anni\Alert('Retailer importer', 'Import failed', ['url' => $importUrl]);
\Anni\Info('Retailer importer', 'Imported 42 retailers', $retailers);
\Anni\Emergency('Retailer importer', 'No retailer after import');