-
Notifications
You must be signed in to change notification settings - Fork 490
Set transport macro for local mechanisms #4777
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
Set transport macro for local mechanisms #4777
Conversation
Build FAILURE |
f4037e4
to
96e3c62
Compare
@mbonsack can you have a look on these transport values? I don't think we would see these too much, but I wanted to make sure that $TRANSPORT points to the ingest mechanism even if a local transport is used. Thanks |
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
The affile plugin implements file(), pipe(), stdin() and stdout() drivers. Make sure all of the source drivers set $TRANSPORT properly. Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
96e3c62
to
0f01f71
Compare
@HofiOne I added code to set $TRANSPORT in the case for both darwin-oslog() and darwin-oslog-stream() a review on that piece would be welcome. |
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.
lgtm
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
0f01f71
to
ccca5c1
Compare
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.
LGTM otherwise.
static inline void | ||
log_msg_set_value_to_string(LogMessage *self, NVHandle handle, const gchar *literal_string) | ||
{ | ||
log_msg_set_value(self, handle, literal_string, strlen(literal_string)); |
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.
We call this on the hot path, for every message, when setting the $TRANSPORT
macro.
I think it could be better if we'd call log_msg_set_value()
with sizeof()
or introduce log_msg_set_value_to_literal_string
as a macro to avoid this per-message strlen()
call.
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.
I didn't check but this should be inlined with the same effect.
It may not, unless we compile using -O3
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
This rounds up the setting of the $TRANSPORT macro for local log transport mechanisms.
The convention used is: local+
+1 mqtt now sets $TRANSPORT to mqtt