2017-25 © Pedro Peláez
 

bundle monolog-splunk-handler

Monolog Splunk Handler based on easylo wrapper

image

flyandi/monolog-splunk-handler

Monolog Splunk Handler based on easylo wrapper

  • Wednesday, April 26, 2017
  • by flyandi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 20 % Grown

The README.md

Monolog Splunk Handler

Simple monolog wrapper for the Easylo Splunk SDK., (*1)

Install, (*2)

composer require flyandi/monolog-splunk-handler

How to use, (*3)

use flyandi/Monolog/Handler/SplunkHandler;

Invoke Handler, (*4)

$handlers[] = new SplunkHandler(
    (string) <Source>,
    (array, optional) <ConnectionParameters>,
    (array, optional) <OptionalParameters>,
    (const, optional) level,
    (boolean, optional) bubble 
);

Connection Parameters

Connection parameter is an array with various options. It supports all connection variants for Splunk including user and token authentication., (*5)

username: (optional) The username to login with. Defaults to "admin"., (*6)

password: (optional) The password to login with. Defaults to "changeme"., (*7)

token: (optional) The authentication token to use. If provided, the username and password are ignored and there is no need to call login(). In the format Splunk SESSION_KEY., (*8)

host: (optional) The hostname of the Splunk server. Defaults to "localhost"., (*9)

port: (optional) The port of the Splunk server. Defaults to 8089., (*10)

scheme: (optional) The scheme to use: either "http" or "https". Defaults to "https"., (*11)

namespace: (optional) Namespace that all object lookups will occur in by default. Defaults to Splunk_Namespace::createDefault()., (*12)

http: (optional) An Http object that will be used for performing HTTP requests. This is intended for testing only., (*13)

Optional Parameters

Optional parameters are included in every log. This is useful if you want to log additional items like user or session data., (*14)

Example, (*15)

    $data = [
        "user" => "Foo",
        "environment" => "Production",
        "version" => "1.0",
        "remoteBrowser" => $env["HTTP_USER_BROWSER"]
    ];

The Versions

26/04 2017

dev-master

9999999-dev

Monolog Splunk Handler based on easylo wrapper

  Sources   Download

MIT

The Requires

 

by Andy Schwarz

monolog splunk easylo