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

Environment variable HOSTNAME used as the sole source of the hostname #28

Closed
ivucica opened this issue Sep 28, 2020 · 0 comments
Closed

Comments

@ivucica
Copy link
Contributor

ivucica commented Sep 28, 2020

The environment variable HOSTNAME is used as the sole source of the hostname in formatter.go.

It would be useful to consult os.Hostname() as well, in case HOSTNAME is empty, as is the case on a machine I used.

(bash still expands ${HOSTNAME}; however, processes don't see the variable and it doesn't show up in getenv, likely helping the confusion.)

ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The environment variable `HOSTNAME` is not necessarily set on a
machine, making a call to `os.Hostname()` a useful replacement.

Fixes bdlm#28.
ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The test output does not expect the hostname to be printed; fixing bdlm#28
breaks the test.
ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The environment variable `HOSTNAME` is not necessarily set on a
machine, making a call to `os.Hostname()` a useful replacement.

Fixes bdlm#28.
ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The test output does not expect the hostname to be printed; fixing bdlm#28
breaks the test.
ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The environment variable `HOSTNAME` is not necessarily set on a
machine, making a call to `os.Hostname()` a useful replacement.

Fixes bdlm#28.
ivucica added a commit to ivucica/bdlm-log that referenced this issue Sep 28, 2020
The test output does not expect the hostname to be printed; fixing bdlm#28
breaks the test.
@mkenney mkenney closed this as completed in 405434d Mar 5, 2021
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