-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mechanism for sending messages to execution log from Java #112
Conversation
using a custom Logback appender that sents log messages to the EventBus. Attaching the right job ID is done using the same MDC based principle that was already used in IgnoreSiftAppender. This fixes issue daisy/pipeline#477 Note that this also follows the proposal of unifying the two types of messages (execution log and detailed log) through one and the same mechanism, except that XProc/XSLT messages are still sent directly to the EventBus: see issue daisy/pipeline#478. In order to support messages belonging to one job coming from several sources, the message sequence numbers are now computed automatically within MessageBuilder, and the withSequence method has been removed.
|
||
@Override | ||
public void start() { | ||
bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way of getting an osgi agnostic appender? If the effort is to big just leave it like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from Slack:
@capitancambio Yes, you're right, and this while we are trying to go in the other direction :). I'm not sure there is a way to avoid it. I couldn't use declarative services because it is a fragment bundle. Maybe the only way is to have several artifacts, one for OSGi, and one for each other dependency injection mechanism you want to use?
I forgot about this bundle being a fragment. I guess it would be reasonable to have different artefacts for different dependency injectors. Although I'd suggest to burn down that bridge when we get to it, the current state is fine for now. |
Replaced by #127. |
... using a custom Logback appender that sents log messages to the
EventBus. Attaching the right job ID is done using the same MDC based
principle that was already used in IgnoreSiftAppender.
This fixes issue daisy/pipeline#477
Note that this also follows the proposal of unifying the two types of
messages (execution log and detailed log) through one and the same
mechanism, except that XProc/XSLT messages are still sent directly to
the EventBus: see issue
daisy/pipeline#478.
In order to support messages belonging to one job coming from several
sources, the message sequence numbers are now computed automatically
within MessageBuilder, and the withSequence method has been removed.