Download the PHP package garbetjie/monolog-bigquery-handler without Composer

On this page you can find all versions of the php package garbetjie/monolog-bigquery-handler. 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 monolog-bigquery-handler

BigQuery Monolog Handler

A simple (and configurable) Monolog handler for writing log messages to BigQuery, making use of Google's google/cloud-bigquery PHP client.

Installation

Requires PHP 7.0.

Getting started

The handler expects the BigQuery dataset and table to have been created already - the handler will not create either of them.

You can run the following command (using the BigQuery command line tool) to create a minimal table that will be able to accept log records (replace $dataset and $table with the actual dataset and table names):

Usage

Simply create an instance of the BigQuery client, and pass it to the handler, along with the dataset and table names to insert log records to.

The usage shown above will send each message individually. It is recommended to make use of a BufferHandler. This will ensure that log messages are batched, and will reduce the duration spent sending log messages.

When determining the size of the buffer to use, ensure that you're aware of the quota limits for streaming inserts in BigQuery. If any of these limits are hit, the whole batch of messages will fail.

An example of using the BufferHandler is shown below:

Custom fields

Additional custom fields can be sent along with the logged fields. These custom fields can be added in the following way:

Custom field values can be any scalar value that can be JSON encoded, or one of the following values:

Mapping fields

By default, the field names to insert to are the same as the structure of a log record. However, if you have BigQuery column names that aren't the same as these, you can map the log record field names to your own column names:


All versions of monolog-bigquery-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-json Version *
monolog/monolog Version ^1.23
google/cloud-bigquery Version ^1.4
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 garbetjie/monolog-bigquery-handler contains the following files

Loading the files please wait ....