Skip to content

Fixing some of the diagrams in the mw/log section#71

Open
MaciejKaszynski wants to merge 7 commits intoeclipse-score:mainfrom
etas-contrib:feature/logging-arch-diagrams
Open

Fixing some of the diagrams in the mw/log section#71
MaciejKaszynski wants to merge 7 commits intoeclipse-score:mainfrom
etas-contrib:feature/logging-arch-diagrams

Conversation

@MaciejKaszynski
Copy link
Contributor

  • Diagrams were taken from https://github.com/eclipse-score/inc_mw_log and converted from uxf to puml.
  • Also fixed the links to embed the new diagrams in the markdown.
    • Note: the links will work after the diagrams are merged to main.

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

@4og
Copy link
Member

4og commented Jan 23, 2026

@rmaddikery, @hoppe-and-dreams, can you please review this PR?

@rmaddikery
Copy link

@MaciejKaszynski
eclipse-score/score#2509 for tracking


activate App

App -> LOG **: CreateLogger(...)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CreateLogger only registers a logger in the container butdoes not trigger the runtime initialization. The initialization is triggered by the first log call. A note would make sense here.


RF -> RT: Store returned instance

RT -> LSF

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RT -> LSF
LSF <- RT: Return Recorder reference


TCR -> RF: Return Configuration instance

group Possibilities

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there are two possibilities:

At compile time:

  1. Console only recorder with console backend
  • log mode is set to console logging by default.
  • Empty recorder if logmode other than KConsole is provided.
  1. All recorders will respective backends
  • Depending on the log mode the runtime sets up the recorders. The log mode supports multiple recorders simultaneously through a composite recorder.

class score::mw::log::detail::Configuration {}
class score::mw::log::detail::TargetConfigReader {}

class score::mw::log::detail::DataRouterRecorder {}
Copy link

@rmaddikery rmaddikery Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revisit because only the EmptyRecorder, ConsoleRecorder and ConsoleRecorderFactory are included in the frontend.

note top of frontend
Frontend contains the public user API,
and the necessary classes to interface
with the backend and implementation details.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with the backend and implementation details.
with the recorder interface.


score::mw::log::Recorder <|-- score::mw::log::detail::FileRecorder
score::mw::log::IRecorderFactory <|-- score::mw::log::detail::FileRecorderFactory
score::mw::log::detail::FileRecorderFactory ..> score::mw::log::detail::FileRecorder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,43 @@
@startuml verbose_logging_ara_log_interaction
Copy link

@rmaddikery rmaddikery Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is legacy and no longer supported here hence should be removed.

:Stack capacity full = true;
else (No)
:Push element to stack;
:Memory Fence (Release);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:Memory Fence (Release);
:Memory Fence (Release);
mark element as writen

stop
endif
endif
:Return null value;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:Return null value;
:Return nullopt

else (No)
:Push element to stack;
:Memory Fence (Release);
:Return element value;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:Return element value;
:Return reference to element

RF -> RT: Store returned instance

RT -> LSF
LSF -> LOG: Return Recorder instance

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LSF -> LOG: Return Recorder instance
LOG <- LSF: Return LogStream with Recorder

SlotDrainer -> MessageBuilder : SetNextMessage(log_record)

SlotDrainer -> NonBlockingWriter : FlushIntoFile()
NonBlockingWriter -> SlotDrainer: kDone

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NonBlockingWriter -> SlotDrainer: kDone
NonBlockingWriter -> SlotDrainer: kDone
ReleaseSlot() // slots are returned to the pool after being flushed.

The SlotDrainer is responsible for resource lifecycle management and not just data transfer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done on 32ca7ea

SlotDrainer -> MessageBuilder : GetNextSpan()

SlotDrainer -> NonBlockingWriter : FlushIntoFile()
NonBlockingWriter -> SlotDrainer: kDone

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the happy case. It would be good to show the kWouldBlock sequence as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this on f38c3f7 However because of

std::ignore = TryFlushSlots();
I think the error would simply be ignored and later flushed so not sure if it makes sense to add

Copy link

@rmaddikery rmaddikery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, comments need to be addressed

@rmaddikery rmaddikery self-assigned this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants