Giter VIP home page Giter VIP logo

liblog's Introduction

OpenSSF Best Practices

EVerest Logo

The primary goal of EVerest is to develop and maintain an open source software stack for EV charging infrastructure. EVerest is developed having modularity and customizability in mind, so it consists of a framework to configure several interchangeable modules which are coupled by MQTT with each other. EVerest will help to speed the adoption to e-mobility by utilizing all the open source advantages for the EV charging world. It will also enable new features for local energy management, PV-integration, and many more.
The EVerest project was initiated by PIONIX GmbH, to help with the electrification of the mobility sector.

A complete documentation can be found here.

Build & Install

Community

Welcome to the EVerest community ๐Ÿ‘‹. See COMMUNITY.md how to get in contact with us.

Contributing

Anyone can contribute to the EVerest project - learn more at CONTRIBUTING.md. All project management related documents incl. our roadmap can be found here.

Governance

EVerest is a project hosted by the LF Energy Foundation. This project's technical charter is located in CHARTER.md and has established it's own processes for managing day-to-day processes in the project at GOVERNANCE.md.

Reporting Issues

To report a problem, you can open an issue in repository against a specific workflow. If the issue is sensitive in nature or a security related issue, please do not report in the issue tracker but instead email [email protected].

Licensing

EVerest and its subprojects are licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

liblog's People

Contributors

a-w50 avatar andistorm avatar caller avatar corneliusclaussen avatar folkengine avatar hikinggrass avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

liblog's Issues

Unexpected filter behavior when referencing `%Process%`

liblog uses boost's filter capabilities for e.g. allowing to configure log levels. It accesses fields such as Severity and Process, I suppose by use of "global attributes".

It is documented in everest-core's logging config file here:
https://github.com/EVerest/everest-core/blob/a5e4173d1726327cb22429bfbe0c65d3ed213b13/cmake/assets/logging.ini#L7-L12

# To get debug logs of only one module, add the "%Process% contains" filter, e.g.:
#
#     "(%Process% contains OCPP201 and %Severity% >= DEBG)"
#
# whereas "OCPP201" is the value of the field `active_modules.NAME.module` in the respective /config/config-*.yaml.
Filter="%Severity% >= INFO"

The documentation section

whereas "OCPP201" is the value of the field active_modules.NAME.module in the respective /config/config-*.yaml

is not correct, it does not work like this currently.

Somewhere along the way, both the actual OS process name and the process prefix of the logged line are changed. (I guess the OS process name is modified here in everest-framework, while the process name to log is modified in lib/logging.cpp in liblog.) Note also how the logged process name changes from active_modules.NAME to the truncated process name during the framework initialization. This logged process name is what is actually filtered on with %Process%, AFAICT.

So, one could say the documentation is incorrect, and change that to state active_modules.NAME, and fix the example. But this also doesn't work if that name is longer than 15 characters, due to liblog's truncation. (We have a serialcommhub_x7 instance name in our configs, and cannot filter on that.)

The ideal fix would be to separate the %Process% filter attribute from what is being logged. Or to introduce a new %ProcessFull% or %ProcessLong%, and handing it a concatenation of both the active_modules.NAME and active_modules.NAME.module, untruncated. (Perhaps concatenated with a :. Fun fact: boost apparently cannot have such a : in the Filter definition.) I hacked something like this locally which works great for the C++ modules, but doesn't pick up the node module's names.

Level always reported as [info] in logs

I noticed that even though I set the logs to different levels, they always are shown at the info levels. For instance:

EVLOG_verbose << "verbose boop!";
EVLOG_debug << "debug boop!";
EVLOG_info << "info boop!";
EVLOG_warning << "warning boop!";

prints out as

[2024-05-17 17:32:31.427336] [0x0000ffff81207cc0] [info]    verbose boop!
[2024-05-17 17:32:31.427351] [0x0000ffff81207cc0] [info]    debug boop!
[2024-05-17 17:32:31.427352] [0x0000ffff81207cc0] [info]    info boop!
[2024-05-17 17:32:31.427354] [0x0000ffff81207cc0] [info]    warning boop!

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.