Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalClient
Commits
fa078fdd
Commit
fa078fdd
authored
Nov 05, 2020
by
Marcus
Committed by
lukas.burgey
Nov 24, 2020
Browse files
Use '>' to prevent systemd from stripping leading white space from log messages
parent
4ad18a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
indent/indent.go
View file @
fa078fdd
...
...
@@ -6,8 +6,9 @@ import (
)
var
(
prefix
=
""
indent
=
" "
// TODO this prefix should be changed to "" once we move to a systemd version which does not strip leading white spaces from our log messages
prefix
=
">"
indent
=
" "
)
// Indent indents a json string if possible
...
...
sink/script/script.go
View file @
fa078fdd
...
...
@@ -126,7 +126,7 @@ func (sink *Sink) handleDep(dep deps.Dep) (output scripts.Output, err error) {
// execute the script
if
sink
.
Config
.
Debug
.
Scripts
{
dep
.
Log
(
"Executing: '%s'"
,
dep
.
Service
.
Command
)
dep
.
Log
(
"Input: %s"
,
in
put
)
dep
.
Log
(
"Input: %s"
,
in
dent
.
Indent
(
iBytes
)
)
}
commandParts
:=
strings
.
Split
(
dep
.
Service
.
Command
,
" "
)
...
...
@@ -254,7 +254,7 @@ func (sink *Sink) sendReply(reply deps.Reply) (err error) {
}
if
sink
.
Config
.
Debug
.
Backend
{
log
.
Printf
(
"Dep Response:
\n
%s"
,
taskResponse
)
log
.
Printf
(
"Dep Response:
%s"
,
indent
.
Indent
(
taskResponse
)
)
}
url
:=
fmt
.
Sprintf
(
"https://%s/client/dep-state"
,
sink
.
Config
.
Hostname
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment