question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve internal logging api and implementation

See original GitHub issue

The current logging implementation is based on https://github.com/orientechnologies/orientdb/blob/master/core/src/main/java/com/orientechnologies/common/log/OLogManager.java

that support this features:

  • Log message formatting
  • Runtime detection and log of the current db
  • global flags for enable and disable level
  • runtime configuration of the logging

the limits of this implementation are:

  • runtime log lookup(in a map) and level check on every log call
  • only global level flags ( as soon as is enabled debug on a corner feature i get all debug code executed)

feature we should include:

  • static log reference that remove maps lookup
  • for package/class level flags ( can be implemented with log.isLoggable(iLevel))

one solution could be rely more on the underling implementation and use it directly in a standard way with static loggers(to check the support of runtime reconfiguration).

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
zeroviancommented, Jul 18, 2018

Please please please switch to slf4j and abandon the custom log formatter and use of JUL.

And I second the vote…ditch OLogManager class completely, it is trying to do things better handled by a proper logging implementation.

1reaction
PhantomYdncommented, Oct 16, 2015

Guys, might be you can switch to slf4j to allow clients to use their own logger implementation? java.util.logging is slowest from implementations. https://www.loggly.com/blog/benchmarking-java-logging-frameworks/ Personally, I didn’t see any reasons to keep OLogManager. It provide a little bitbetter performance (measured by me) in respect to JUL, but it’s still beyond log4j and log4j2.

Btw, I can transform codebase to slf4j + log4j2 and then we can compare performance. What do you think?

And one more point: there are loggers which allow to build much more complex logging infrastracture - for example sending logs by tcp.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve internal logging API. · Issue #7096 - GitHub
Implement some base tempate-class that provides all logging facilities and derive all other classes from it. The syntax should be like: LOG(WARN) ...
Read more >
Kernel logging: APIs and implementation - IBM Developer
This article begins its exploration of logging in the kernel by looking at the application programming interfaces (APIs) used to configure ...
Read more >
Enterprise Application Logging Best Practices (A Support ...
Application logs reveal information on both internal and external events that are visible to the application during its runtime. When a bug, security...
Read more >
Building A Central Logging Service In-House
In this article, Akhil Labudubariki walks through a number of steps and considerations his team made when developing their own in-house Central ...
Read more >
.NET Logging: Best Practices for your .NET Application ...
Logging is a key requirement of any production application. .NET Core offers support for outputting logs from your application.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found