GithubHelp home page GithubHelp logo

Logging improvements about edgex-go HOT 9 CLOSED

edgexfoundry avatar edgexfoundry commented on August 16, 2024
Logging improvements

from edgex-go.

Comments (9)

drasko avatar drasko commented on August 16, 2024

I would opt for JSON structured logs that can be easily parsed by a machine. this is why in export services we used Uber Zap: https://github.com/uber-go/zap

from edgex-go.

iotgopher avatar iotgopher commented on August 16, 2024

In addition to zap, this is a good package to rotate logs https://godoc.org/gopkg.in/natefinch/lumberjack.v2

from edgex-go.

yanghua avatar yanghua commented on August 16, 2024

hi all,
It seems the project has two log formats when I run multiple microservices. I am writing the scheduler microservice. The JSON format looks good. But who can tell me which one I should choose?

from edgex-go.

yanghua avatar yanghua commented on August 16, 2024

Hi all,
If no one can give a suggestion, I will agree with @drasko and @RTmaster to replace logger.LoggingClient with uber's zap in my #57 issue. I find the logger.LoggingClient can not print the real code line and define log output level like log4j.

from edgex-go.

tsconn23 avatar tsconn23 commented on August 16, 2024

@yanghua You need to be sure your logging solution is behind an interface. Properly speaking, logger.loggingClient IS an interface and it is used by all of the core services. You could potentially extend the loggingClient factory to instantiate your new type of logger similar to what has been done for the DBClient.

from edgex-go.

yanghua avatar yanghua commented on August 16, 2024

@tsconn23 I know LoggingClient client is a interface. But I think the system/framework kernal should provide a unified (a project just need one format) and extendible (could have multiple implementations, but should not let upper modules implement itself, they just need to use the abstract API) log framework. The unified and controllable log format would bring many advantages: collect, parse, analyze and so on.

from edgex-go.

drasko avatar drasko commented on August 16, 2024

Status?

from edgex-go.

drasko avatar drasko commented on August 16, 2024

If no objections, I will close this one due too inactivity.

from edgex-go.

drasko avatar drasko commented on August 16, 2024

Closed due to inactivity.

from edgex-go.

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.