devnw / alog Goto Github PK
View Code? Open in Web Editor NEWFully concurrent, non-IO blocking Logger for Go
License: Apache License 2.0
Fully concurrent, non-IO blocking Logger for Go
License: Apache License 2.0
So users can create a destination that has an internal testing.T or testing.B object which the io.Writer logs to for errors / logs rather than stdout/stderr so that test outputs show appropriately.
This seems to be something people look for in loggers so it should be supported in a way that fits into the simplified API for alog
This should allow for a user to deregister a log level or destination at runtime.
This should accept a channel of interface which then reads in values and properly routes them throughout the logger based on interfaces that are implemented on the inputs.
This should be able to add new destinations and level registrations in a manner that doesn't interfere with the existing registrations and allows new registrations to begin receiving new logs immediately.
This would contain the parent logger internally but would have the ability to add supplementary information in the child logs.
Could follow a similar pattern to context in how it nests.
The Wait() method should properly block until the alog instance has properly closed all internal channels and written all remaining logs to the registered IO.
When a context is closed the current implementation will exit out of all logging without draining the channel first. This can cause logs to be lost because they are not pulled prior to exiting.
Each channel should be monitored using something like len
of the channel to ensure that all logs are drained prior to exiting the logger. Obviously, this doesn't solve the case where the application is closed, but perhaps an option should be added to monitor for an os
signal and drain remaining logs when that happens.
Define an interface which looks similar to this
type streamers interface {
Events() <-chan interface{}
}
That can be registered into the alog system. There should be the ability to have 0-N of these registered and alog should pull events from them and log them to the appropriate destinations based on their interface types.
Internal interface types for it to recognize would be initially error
and stringer
which would go to the Error
and Print
methods of alog respectively. This should be extensible in the future to be able to add additional error types. This registration system should be able to use the same c
method types which accept interface types.
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.