GithubHelp home page GithubHelp logo

Comments (4)

maciaszczykm avatar maciaszczykm commented on May 17, 2024

@bryk @cheld @floreks @zreigz I am thinking about architecture of this implementation and it would be great if you would have any suggestions. Currently I can see two ways how it could be implemented:

  • We're using emicklei/go-restful to provide restful webservices, and we can try to use logging provided by it. It needs to be configured in the way, that we want (still not sure about it, what do we need in logs?).
  • We can log every request from apihandler.go file. It would be easier to configure and messages could be more specific, but it won't be as generic as first solution.

Do you have any tips? Maybe you can see another solution?

from dashboard.

floreks avatar floreks commented on May 17, 2024

I think it would be good to use what go-restful provides. We can define for every web service different log function or common for every ws. This example shows it pretty good.

https://github.com/emicklei/go-restful/blob/master/examples/restful-NCSA-logging.go

Only thing to establish is whether we need to log differently every WS or use commong log formatting for all.

from dashboard.

bryk avatar bryk commented on May 17, 2024

We should have two layers of logging. One generic, which basically logs all HTTP requests, without knowing what they do. This is actually very useful for debugging. It can show method, URI, cookies or headers. The other specific to api methods, which would help in debugging, like log.info('creating replica set %#v', foo).

from dashboard.

cheld avatar cheld commented on May 17, 2024

I cannot help much as I have briefly looked in the backend code yet.

In Java I would recommend not to mix logs during concurrent rest calls and add some kind of session information to each log. So logs are clean and can easily be filtered for a specific session or specific action.
But, in our case everything different so just ignore my comment :)

from dashboard.

Related Issues (20)

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.