All Projects → Superbalist → monolog-google-cloud-json-formatter

Superbalist / monolog-google-cloud-json-formatter

Licence: MIT license
A Monolog extension for formatting log entries for Google Cloud Logging

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to monolog-google-cloud-json-formatter

GoogleCloudLogging
Swift (Darwin) library for logging application events in Google Cloud.
Stars: ✭ 24 (+60%)
Mutual labels:  google-cloud, google-cloud-platform, google-cloud-logging
gcpsamples
Simple "Hello world" samples for accessing Google Cloud APIs in (node,dotnet,java,golang,python)
Stars: ✭ 100 (+566.67%)
Mutual labels:  google-cloud, google-cloud-platform
iris3
An upgraded and improved version of the Iris automatic GCP-labeling project
Stars: ✭ 38 (+153.33%)
Mutual labels:  google-cloud, google-cloud-platform
spanner-bench
Google Cloud Spanner Query Planner Benchmarking
Stars: ✭ 24 (+60%)
Mutual labels:  google-cloud, google-cloud-platform
spannerz
Google Cloud Spanner Query Planner Visualizer
Stars: ✭ 60 (+300%)
Mutual labels:  google-cloud, google-cloud-platform
deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+1126.67%)
Mutual labels:  google-cloud, google-cloud-platform
deploy-cloudrun
This action deploys your container image to Cloud Run.
Stars: ✭ 238 (+1486.67%)
Mutual labels:  google-cloud, google-cloud-platform
Googlecloudarchitectprofessional
Resources to prepare for Google Certified Cloud Architect Professional Exam - 2017
Stars: ✭ 177 (+1080%)
Mutual labels:  google-cloud, google-cloud-platform
emulator-tools
Google Cloud BigTable and PubSub emulator tools to make development a breeze
Stars: ✭ 16 (+6.67%)
Mutual labels:  google-cloud, google-cloud-platform
cloud-cardboard-viewer
Build a Node.js & Angular 2 Web App using Google Cloud Platform
Stars: ✭ 23 (+53.33%)
Mutual labels:  google-cloud, google-cloud-platform
auth
A GitHub Action for authenticating to Google Cloud.
Stars: ✭ 567 (+3680%)
Mutual labels:  google-cloud, google-cloud-platform
zorya
Google Cloud Instance Scheduler helping to reduce costs by 60% on average for non-production environments.
Stars: ✭ 127 (+746.67%)
Mutual labels:  google-cloud, google-cloud-platform
Flysystem Google Cloud Storage
Flysystem Adapter for Google Cloud Storage
Stars: ✭ 237 (+1480%)
Mutual labels:  google-cloud, google-cloud-platform
augle
Auth + Google = Augle
Stars: ✭ 22 (+46.67%)
Mutual labels:  google-cloud, google-cloud-platform
Google Cloud Cpp
C++ Client Libraries for Google Cloud Services
Stars: ✭ 233 (+1453.33%)
Mutual labels:  google-cloud, google-cloud-platform
awesome-bigquery-views
Useful SQL queries for Blockchain ETL datasets in BigQuery.
Stars: ✭ 325 (+2066.67%)
Mutual labels:  google-cloud, google-cloud-platform
Gcp Audit
A tool for auditing security properties of GCP projects.
Stars: ✭ 140 (+833.33%)
Mutual labels:  google-cloud, google-cloud-platform
Gcping
Like gcping.com but a command line tool
Stars: ✭ 153 (+920%)
Mutual labels:  google-cloud, google-cloud-platform
K8s-Cluster-Provisioner-GCP-Terrafrom
This repo will seamlessly setup self managed Kubernetes cluster in GCP using Terraform and Kubespray.
Stars: ✭ 17 (+13.33%)
Mutual labels:  google-cloud, google-cloud-platform
Php-Google-Vision-Api
Google Vision Api for PHP (https://cloud.google.com/vision/)
Stars: ✭ 61 (+306.67%)
Mutual labels:  google-cloud, google-cloud-platform

A Monolog extension for formatting log entries for Google Cloud Logging

Author StyleCI Software License Packagist Version Total Downloads Build Status

This library works in conjunction with https://github.com/GoogleCloudPlatform/fluent-plugin-google-cloud

fluent-plugin-google-cloud is an output plugin for fluentd which sends logs to the Google Cloud Logging API.

This formatter outputs logs entries in json which the fluent-plugin-google-cloud application understands.

Installation

composer require superbalist/monolog-google-cloud-json-formatter

Usage

use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Superbalist\Monolog\Formatter;

// create a handler
$handler = new StreamHandler('path/to/your.log', Logger::WARNING);

// use custom formatter in handler
$handler->setFormatter(new GoogleCloudJsonFormatter());

// create a log channel
$log = new Logger('name');
$log->pushHandler($handler);

// add records to the log
$log->addWarning('Foo');
$log->addError('Bar');
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].