[CONTROLLER-1134] Clustering: Use slf4j Logger instead of akka LoggingAdapter Created: 03/Feb/15  Updated: 11/Feb/15  Resolved: 11/Feb/15

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Post-Helium
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2669
Priority: Normal

 Description   

The Shard and raft code uses akka's LoggingAdapter. There's a couple downsides to this:

  • Enabling debug for the Shard class in the pax logging cfg file (log4j.logger...=DEBUG) does not work. I also tried setting logging-filter = "akka.event.slf4j.Slf4jLoggingFilter" in the akka.conf. It appears that akka logging does not support enabling debug per class/package. You can only enable debug globally in the akka.conf which produces a lot of output.
  • It's not desirable for usability to have multiple mechanisms to enable debug. In addition, modifying logging options in the akka.conf would require a controller restart whereas changes to the pax logging cfg file are dynamic.
  • In the pax logging cfg file, if you configure the ConversionPattern to include line numbers (%L), since akka uses a separate logging actor, that actor's line # is logged which isn;t useful.

The reason for initially using akka's logging was because it's asynchronous (logging is done by a separate actor). However logging in karaf is done asynchronously via an OSGi service.

Therefore the usage of akka's LoggingAdapter will be changed to the standard slf4j Logger.



 Comments   
Comment by Tony Tkacik [ 09/Feb/15 ]

Could you please provide pointers to fix? eg. gerrit link or wiki which was fix of this issue?

Comment by Tom Pantelis [ 09/Feb/15 ]

Submitted https://git.opendaylight.org/gerrit/#/c/14810/

Generated at Wed Feb 07 19:54:46 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.