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

Add --log-file to gvproxy #312

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

baude
Copy link
Member

@baude baude commented Jan 15, 2024

Add ability specify a log-file for log messages. This PR redirects are logged messages from the logrus logger to a given file. It is intended to help debug gvproxy failures and usage.

@baude
Copy link
Member Author

baude commented Jan 15, 2024

@mheon ptal

@mheon
Copy link
Member

mheon commented Jan 15, 2024

LGTM. We're doing this on the Podman side for gvproxy (setting os.Stdout/Stderr to a file, instead of passing this as an argument) but this is a good utility add

@baude
Copy link
Member Author

baude commented Jan 15, 2024

LGTM. We're doing this on the Podman side for gvproxy (setting os.Stdout/Stderr to a file, instead of passing this as an argument) but this is a good utility add

@mheon long term, i'm wondering if podman is --log-level debug ... maybe cann gvproxy with this file too and always store in rundir or the like (you know, another memory leak :) )

@mheon
Copy link
Member

mheon commented Jan 15, 2024

That's basically what we're doing right now, but only on Windows (where we otherwise run into terminal issues).

Copy link
Collaborator

@cfergeau cfergeau left a comment

Choose a reason for hiding this comment

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

Ideally we'd send the logs to macos unified logs ( https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code?language=objc ), but I haven't figured out how to do that from golang yet ^^

cmd/gvproxy/main.go Show resolved Hide resolved
Add ability specify a log-file for log messages.  This PR redirects are
logged messages from the logrus logger to a given file.  It is intended
to help debug gvproxy failures and usage.

Signed-off-by: Brent Baude <[email protected]>
Copy link
Contributor

openshift-ci bot commented Jan 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude, cfergeau

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cfergeau
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 16, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 012bc90 into containers:main Jan 16, 2024
12 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants