Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Remove Logging to Journald only under systemd #251

Merged
merged 1 commit into from May 7, 2019

Conversation

sargun
Copy link
Contributor

@sargun sargun commented May 7, 2019

This makes it so that the executor doesn't rely on CGO. It needed
cgo before to figure out if it was running as a systemd service
or not. This makes it assume it will always run as a systemd service
unless otherwise stated by console flags, rather than relying on
environment detection.

This makes it so that the executor doesn't rely on CGO. It needed
cgo before to figure out if it was running as a systemd service
or not. This makes it assume it will always run as a systemd service
unless otherwise stated by console flags, rather than relying on
environment detection.
@codecov
Copy link

codecov bot commented May 7, 2019

Codecov Report

Merging #251 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #251      +/-   ##
=========================================
+ Coverage   35.18%   35.2%   +0.01%     
=========================================
  Files          77      77              
  Lines        9521    9517       -4     
=========================================
  Hits         3350    3350              
+ Misses       5753    5749       -4     
  Partials      418     418
Impacted Files Coverage Δ
logsutil/util_linux.go 100% <ø> (+71.42%) ⬆️
cmd/titus-darion/main.go 46.66% <0%> (ø) ⬆️
cmd/titus-reaper/main.go 0% <0%> (ø) ⬆️

@sargun sargun requested a review from rgulewich May 7, 2019 01:20
if debug {
log.SetLevel(log.DebugLevel)
} else {
logsutil.MaybeSetupLoggerIfOnJournaldAvailable()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do this only when !debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because if you're running with -debug, you're probably running from the console, and not a service?

@sargun sargun merged commit 83f6cd9 into master May 7, 2019
@sargun sargun deleted the remove-native-journald branch May 7, 2019 19:18
@sargun sargun restored the remove-native-journald branch March 23, 2020 07:33
@sargun sargun deleted the remove-native-journald branch March 23, 2020 07:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants