Giter VIP home page Giter VIP logo

alog's People

Contributors

benjivesterby avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

alog's Issues

Add test override method

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.

Add structured logging support

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

Finish the Wait() method

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.

Solve completeness issue regarding closed contexts or applications exiting

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.

Add the ability to listen to streamers

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.