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

INTERFACER_LOG should be a path to a file #10

Open
densizengin opened this issue Feb 3, 2023 · 1 comment
Open

INTERFACER_LOG should be a path to a file #10

densizengin opened this issue Feb 3, 2023 · 1 comment

Comments

@densizengin
Copy link
Member

I think INTERFACER_LOG should be a path to a file, instead of a path to a directory.

INTERFACER_LOG variable is fetched than passed here like this:

file, err := os.OpenFile(filepath.Join(logPath, "proxy.log"),

I can take care of this, but tell me what you think.

@densizengin
Copy link
Member Author

It might have a default value of "proxy.log". Such as:

path, ok := os.LookupEnv("INTERFACER_LOG")
if !ok {
	log.Printf(`"INTERFACE_LOG" was not provided; defaulting to "./proxy.log"`)
	path = "./proxy.log"
} else if path == "" {
	return nil, errors.New(`"INTERFACER_LOG" must not be empty"`)
}

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

No branches or pull requests

1 participant