承接 anexia-it/php-cloudlog 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anexia-it/php-cloudlog

Composer 安装命令:

composer require anexia-it/php-cloudlog

包简介

CloudLog PHP client library

README 文档

README

php-cloudlog is a client library for Anexia CloudLog.

Currently it only provides to push events to CloudLog. Querying is possible in a future release.

There are two connection types:

  • directly connected for high throughput
    • requires php-rdkafka (relies on librdkafka >= 0.9.1)
  • http client

Get started

$ composer require anexia-it/php-cloudlog

composer.json

{
    "require": {
        "anexia-it/php-cloudlog": "<2.0.0"
    }
}

Quickstart

<?php

use CloudLog\Client;

// Init CloudLog client
$client = Client::create("index","ca.pem","cert.pem","cert.key");

// Alternative CloudLog client (http)
$client = Client::createHttp("index","token");

// Push simple message
$client->pushEvent("message");

// Push document (multiple formats supported: object, assoc array, json string)

// object
class Event {
    public $timestamp;
    public $user;
    public $message;
    public $severity;
}

$event = new Event();
$event->timestamp = 1495024205123;
$event->user = "test";
$event->severity = 1;
$event->message = "My first CloudLog event";

$client->pushEvent($event);

// associative array
$client->pushEvent([
    "timestamp" => 1495024205123,
    "user" => "test",
    "severity" => 1,
    "message" => "My first CloudLog event"
]);

// json string
$client->pushEvent('{
  "timestamp": 1495024205123,
  "user": "test",
  "severity": 1,
  "message": "My first CloudLog event"
}');

统计信息

  • 总下载量: 49
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固