jonathan-robertson / logentrus Goto Github PK
View Code? Open in Web Editor NEWA secure Logentries (https://logentries.com) hook for Logrus (https://github.com/sirupsen/logrus)
License: Apache License 2.0
A secure Logentries (https://logentries.com) hook for Logrus (https://github.com/sirupsen/logrus)
License: Apache License 2.0
Failed to fire hook: write tcp xxx.xxx.xxx.xxx:xxxxxx->yyy.yyy.yyy.yyy:yyy: write: connection timed out
I'm not setting a timeout or deadline, so it would seem they're not being enforced by golang, but they could be enforced by my OS.
Ref: https://golang.org/pkg/net/#Dialer
...
// Timeout is the maximum amount of time a dial will wait for
// a connect to complete. If Deadline is also set, it may fail
// earlier.
//
// The default is no timeout.
//
// When dialing a name with multiple IP addresses, the timeout
// may be divided between them.
//
// With or without a timeout, the operating system may impose
// its own earlier timeout. For instance, TCP timeouts are
// often around 3 minutes.
Timeout time.Duration
// Deadline is the absolute point in time after which dials
// will fail. If Timeout is set, it may fail earlier.
// Zero means no deadline, or dependent on the operating system
// as with the Timeout option.
Deadline time.Time
...
Hook.Levels
(though doubtfully the problem, I was responding that hook supported all levels and then checking on fire if level was within range of Hook.Priority
property)Update Hook.Levels
to return what it should and Update Hook.Fire
to redial on failure.
It seems that the logrus authors now decided that there's no turning back from the lower-case naming. From the top of the README
Regretfully, there's no turning back now. Everything using logrus will need to use the lower-case: github.com/sirupsen/logrus. Any package that isn't, should be changed.
I know this library was already changed once to lowercase and then changed back again to uppercase. Now it might seem it needs to be changed to lowercase permanently. What a mess ๐ฌ
I have been dealing with this issue with vendoring so far, but as more libraries start using lower-case referencing, it becomes difficult to avoid changing over.
What do you think?
Hello, I'm just opening this issue to let you know, the next release of logrus (v1.2.0) will add a new trace level named Trace below Debug.
Here is the PR for reference sirupsen/logrus#844
You may want to take into account this new level.
const (
host = "data.logentries.com"
port = 443
)
I glanced over the documentation around the different ports, etc., and this endpoint with port of 443 seemed to be the way to go if you wanted to use TLS.
I can't imagine why anyone would want to send in an insecure fashion (except for speed maybe?), but maybe there are other benefits that I'm not seeing right now.
If you want this changed... to be added as params for the New function call, for example... just reply and let me know or submit a pull request and I'll be happy to check it out.
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.