PHP code example of elixis / google-big-query-logger
1. Go to this page and download the library: Download elixis/google-big-query-logger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elixis / google-big-query-logger example snippets
oogleBigQueryLogger\BigQueryLogger;
use GoogleBigQueryLogger\BigQueryTable;
use GoogleBigQueryLogger\Handler\BigQueryHandler;
use Monolog\Logger;
//Create a new table in a dataset
$bigQueryTable = new BigQueryTable();
$bigQueryTable->createTable();
// Create the logger
$logger = new Logger('logger');
// Add a new BigQuery handler
$logger->pushHandler(new BigQueryHandler($bigQueryTable));
// You can now use your logger
$logger->info('With only age');