2017 © Pedro Peláez
 

library cloudwatch-logger

CloudWatch Logging Handler

image

handybitesize/cloudwatch-logger

CloudWatch Logging Handler

  • Tuesday, July 25, 2017
  • by Handybitesize
  • Repository
  • 1 Watchers
  • 0 Stars
  • 639 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

CloudWatch Logger

Simple Logger for Creation's F3-based CMS, (*1)

Usage, (*2)

$logger = \CreationMedia\CloudWatchLogger\Logger::getInstance();
$logger->setLogName(Config::get('LOG_NAME')); //prepend with file:// for file logging
$logger->setLogLevel($logger::INFO); //Defaults to INFO

$logger::set('STRIP_NAMESPACE', 'Creation\\'); //optionally strip common namespaces
$logger::set('AWS_CREDENTIALS', self::get_aws_creds()); //Guzzle Promise format
$logger::set('SKIP_CREATE', true); //defaults false, skip the creation of streams.

$logger::set('LOG_STREAM', self::get('ENVIRONMENT')); //LOG_STREAM required for CW

//Send some logs'
        \CreationMedia\CloudWatchLogger\Logger::debug('This is simple a debugging message', ['debug' => true]);
        \CreationMedia\CloudWatchLogger\Logger::info('Hello, I\'m a logger, that is some information for you');
        \CreationMedia\CloudWatchLogger\Logger::notice('Take note!', ['key_1'=>'val_1', 'key_2' =>['foo' => 'bar', 'baz' => 'quz'], 'key_3'=>1234]);
        \CreationMedia\CloudWatchLogger\Logger::warning('This IS A WARNING');
        \CreationMedia\CloudWatchLogger\Logger::error('Opps. There is an error!');
        \CreationMedia\CloudWatchLogger\Logger::critical('CRITICAL ERROR');
        \CreationMedia\CloudWatchLogger\Logger::alert('WOOP WOO THIS IS AN ALERT');
        \CreationMedia\CloudWatchLogger\Logger::emergency('Emergency! There\'s an emergency happening');
        //\CreationMedia\CloudWatchLogger\Logger::abort('Just stop it'); //abort level will exit the appliction with the message;

die('test done');

The Versions

25/07 2017

dev-master

9999999-dev

CloudWatch Logging Handler

  Sources   Download

MIT

The Requires

 

25/07 2017

v1.3

1.3.0.0

CloudWatch Logging Handler

  Sources   Download

MIT

The Requires

 

25/07 2017

v1.2.6

1.2.6.0

CloudWatch Logging Handler

  Sources   Download

MIT

The Requires