Git Product home page Git Product logo

plug_logger_json's People

Contributors

bgmarx avatar crowdhailer avatar davich avatar gazler avatar gmile avatar johnkelly avatar scrogson avatar shanethehat avatar slashdotdash avatar trumant avatar

Stargazers

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

Watchers

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

plug_logger_json's Issues

Provide config for json library

Phoenix now uses Jason by default. Would be great if there was a config and one could pass in Phoenix.json_library().

I'd be happy to make a PR.

Remove duplicate error logging

I haven't been able to figure out how to shut off the default non JSON error logging, so that the error is only logged in the JSON format instead of the default + JSON formats.

RoadMap 0.2

  • Support different log levels. Make a debug level that is verbose (logs headers & params) and trim the info level a bit further (remove params).
  • Log exceptions in JSON tagged with the request id (see support_errors branch for first attempt)

For those thinking of using 0.1, plug_logger_json is used in very high traffic services on production without issue and sends those logs to an ELK stack.

Future Improvements:

  • Find a way to make the fields logged more customizable.

Support different log levels

Support different log levels. Make a debug level that is verbose (logs headers & params) and trim the info level a bit further (remove params).

Filtering nested fields

I'm using the JSONAPI spec with phoenix and plug. I've really enjoyed using this plugin. The one downside is that with JSONAPI, nested fields are pretty common and I couldn't get this logger to filter on nested fields. Eg. {"data": {"attributes": {"password": "thing"}}}

I did get nested filtering working on a fork here, though it broke Dializer. This actually surprised me a bit as the spec specifies a tuple with two strings, I was pretty sure maps were being passed in in the tests. Anyway, I thought I'd check to see if you'd be interested in merging the changes before I spent time fixing Dializer.

Let me know, and thanks for sharing this sweet library!

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.