Skip to content
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

Allow passing an ID to journald log driver #1541

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libcrun/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ libcrun_init_logging (crun_output_handler *new_output_handler, void **new_output

case LOG_TYPE_JOURNALD:
*new_output_handler = log_write_to_journald;
*new_output_handler_arg = NULL;
*new_output_handler_arg = (void *) id;
Copy link
Member

Choose a reason for hiding this comment

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

An idea...

Looking at the callback signature:

void log_write_to_journald (int errno_, const char *msg, int verbosity, void *arg arg_unused)

We could rename the arg_unused to something else now, especially since it will be used.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, I renamed it to id.

Copy link
Member Author

@saschagrunert saschagrunert Sep 3, 2024

Choose a reason for hiding this comment

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

Ah I had to revert since it's still technically unused when building without systemd support: https://github.com/containers/crun/actions/runs/10678078263/job/29594436938?pr=1541

break;
}
}
Expand Down
Loading