Download the PHP package matteomeloni/cloudwatch-logs without Composer

On this page you can find all versions of the php package matteomeloni/cloudwatch-logs. 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 cloudwatch-logs

AwsCloudwatchLogs

Latest Version on Packagist Total Downloads

Eloquent syntax for store and retrieve logs from Aws CloudWatch Logs.

Installation


Via Composer

Run

Update AWS CloudWatch Logs config in config/aws-cloudwatch-logs.php

Usage


Extends your model with Matteomeloni\CloudwatchLogs\CloudWatchLogs

Mutators and Casting

Defining An Accessor

An accessor transforms an attribute value when it is accessed. To define an accessor, create a get {Attribute} Attribute method on your model where {Attribute} is the "studly" cased name of the column you wish to access.

Defining A Mutator

A mutator transforms an attribute value when it is set. To define a mutator, define a set{Attribute}Attribute method on your model where {Attribute} is the "studly" cased name of the column you wish to access.

Attribute Casting

Your model's $casts property provides a convenient method of converting attributes to common data types.

The $casts property should be an array where the key is the name of the attribute being cast and the value is the type you wish to cast the column to.

See the Laravel documentation to learn more.

Retrieving Models

The model's all method will retrieve all of the logs from the model's associated logGroupName and logStreamName.

By default, all logs generated on the current day will be extracted.

If you want to change the time interval, then just use the whereBetween method

Building Queries

This package support the "CloudWatch Logs Insights" feature.

For more information of this feature, you can see the Aws CloudWatch Logs Insight Documentation

To start a new query you can use the query method and the result of this operation is the queryId string, to be used to retrieve the query results:

Select

The select method allows you to specify which columns to show in the query result.

Conditions

Avaialable comparison operators: = != < <= > >=

Logical Grouping

Sometimes it may be necessary to group several "where" clauses in parentheses to achieve logical grouping in the query.

To accomplish this, you may pass a closure to the where method:

Ordering

The orderBy method allows sorting of the query by a given column.

The first argument accepted by this metod, should be the column you wish to sort by and the second argument, determines the direction of the sort, asc or desc

Limit

The take or limit method allows to limit the number of results returned from the query.

Aggregates

This library also provides a variety of methods for retrieving aggregate values like countmin, maxsum, and avg.

For more information of this feature, you can see the Aws CloudWatch Logs Insigiht Documentation

You may call any of these methods after constructing your query:

It is possible to group and aggregate the results through the groupBy method.

In this case the result of the operation will be a collection.

In addition to a specific column, it is also possible to group for all the functions offered by the AWS CloudWatch Logs Insights service.

Retrieving Single Model

In addition to retrieving all of the records matching a given query, you may also retrieve single records using the find or first methods.

Store new log

To insert a new record into AWS CloudWatch Log, you should instantiate a new model instance and set attributes on the model.

Then, call the save method on the model instance:

Alternatively, you may use the create method to "save" a new log using a single PHP statement. The inserted log instance will be returned to you by the create method:

Requirements

Change log

Please see the changelog for more information on what has changed recently.

Testing

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of cloudwatch-logs with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
illuminate/support Version ~7|~8
aws/aws-sdk-php Version ^3.194
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 matteomeloni/cloudwatch-logs contains the following files

Loading the files please wait ....