logentriescommunity / le_php Goto Github PK
View Code? Open in Web Editor NEWLogentries support for PHP
Logentries support for PHP
Hi!
I'm currently integrating logentries into our application. The current released version is 0.6, but I can't really find anything about:
Can you share any documentation about this?
The constants defined in LeLogger.php has been set to api.logentries.com
, but the documentation (https://logentries.com/doc/input-token/) says that the address should be data.logentries.com
.
I guess that this needs to be changed, both for TCP and TLS?
I noticed that logentries by default is a singleton. This is handy, but for my situation I would prefer to open a number of sockets so I can connect with multiple channels.
Could we make the constructor public but keep the tcp socket as static? This way we can reduce the sockets, but maintain the ability to post logs to multiple channels.
Please use predefined contants, see:
http://php.net/manual/en/network.constants.php and http://www.ietf.org/rfc/rfc3164.txt (sec: 4.1.1)
Relying on global variables is considered a bad practice in PHP. It would be best not to promote or suggest using this.
You have a fairly decent API in LeLogger.php, but promoting the API in lelogger.php
is something I would suggest you avoid.
Rather than making it 'the API' it may be better to show it off as an example that can be re-used, but shouldn't be directly included. I imagine lelogger.php
was added to ease setting up the LeLogger
object, but it may be better to do this in the form of a factory method that takes an array for setup.
Just a thought.
Hi!
Would it be possible to add this library to packagist? I use composer for dependency management and would like to try out logentries, downloading files and adding them to the project root is a tad archaic though :-)
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.