2017 © Pedro Peláez
 

yii2-extension yii2-ext

Yii2 extension for LongLog application

image

longlog/yii2-ext

Yii2 extension for LongLog application

  • Saturday, December 9, 2017
  • by demi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii2-LongLog

Yii2 extension for LongLog application
, (*1)

Installation

composer require "longlog/yii2-ext" "~1.0"

# Configurations

Edit /common/config/main.php:, (*2)

<?php
return [
    'components' => [
        'longlog' => [
            'class' => '\longlog\yii2\Component',
            'endpointUrl' => 'http://api.longlog.ru',
            'projectToken' => 'p8eGzXz5o4A2eulYhBvbrkghbAfirRwL',
        ],
    ],
];

# Usage

Variant 1: LongLog with client wrapper, (*3)

<?php
// New LongLog instance with client wrapper
$longLog = Yii::$app->longlog->newLog('CRON_SEND_EMAILS');
// Optionaly set payload any string 
$longLog->setPayload("userIds: [1,2,3]");
// Remember the processing start time
$longLog->start(); 

// ...YOUR JOB HERE...

// Submit LongLog to API
$longLog->finish()->submit();

Variant 2: LongLog without client wrapper, (*4)

<?php
// New LongLog instance without client wrapper
$longLog = new \longlog\LongLog('CRON_SEND_EMAILS');
// Optionaly set payload any string
$longLog->setPayload("userIds: [1,2,3]");
// Remember the processing start time
$longLog->start();

// ...YOUR JOB HERE...

// Calculate job processing time and submit log to API
$longLog->finish();

Yii::$app->longlog->getClient()->submit($longLog);

The Versions

09/12 2017

dev-master

9999999-dev https://github.com/demisang/yii2-longlog#readme

Yii2 extension for LongLog application

  Sources   Download

GNU

The Requires

 

extension yii2 longlog

09/12 2017

1.0.0

1.0.0.0 https://github.com/demisang/yii2-longlog#readme

Yii2 extension for LongLog application

  Sources   Download

GNU

The Requires

 

extension yii2 longlog