Skip to content

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

Closed
MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
etas-contrib:feature/logging-arch-diagrams
Closed

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

Conversation

@MaciejKaszynski
Copy link
Copy Markdown
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
Copy Markdown

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

@4og
Copy link
Copy Markdown
Member

4og commented Jan 23, 2026

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

@rmaddikery
Copy link
Copy Markdown
Contributor

@MaciejKaszynski
eclipse-score/score#2509 for tracking


activate App

App -> LOG **: CreateLogger(...)
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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.
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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);
Copy link
Copy Markdown
Contributor

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;
Copy link
Copy Markdown
Contributor

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;
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

Copy link
Copy Markdown
Contributor

@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

@4og
Copy link
Copy Markdown
Member

4og commented Feb 11, 2026

@MaciejKaszynski, thank you for the contribution! We are going to import these changes.
It is greatly appreciated if you squash the commits or at least get rid of the merge commit as it will be causing issues during the import.

- Added plantuml diagrams
- Updated links in READMEs to the diagrams
- Diagrams related to datarouter shall be in the seperate
  eclipse-score/logging repo
@MaciejKaszynski
Copy link
Copy Markdown
Contributor Author

@MaciejKaszynski, thank you for the contribution! We are going to import these changes. It is greatly appreciated if you squash the commits or at least get rid of the merge commit as it will be causing issues during the import.

Rebased to new main & squashed to 1 commit

@4og 4og self-assigned this Feb 16, 2026
4og pushed a commit that referenced this pull request Mar 3, 2026
Imported PR #71 to SSP:
- Added plantuml diagrams
- Updated links in READMEs to the diagrams
- Diagrams related to datarouter shall be in the seperate
  eclipse-score/logging repo

GIT_ORIGIN_SPP_REV_ID: f451736c7c8ad71122c7bff82234dccdc5e6d3a7
@4og
Copy link
Copy Markdown
Member

4og commented Mar 3, 2026

Hi @MaciejKaszynski, we merged your contribution in 5ff2c9d

@MaciejKaszynski MaciejKaszynski deleted the feature/logging-arch-diagrams branch March 3, 2026 10:37
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