Commit b1193fc8 authored by lukasburgey's avatar lukasburgey
Browse files

Merge branch 'improve-logging'

parents 4ad18a9f fa078fdd
Pipeline #119370 passed with stages
in 41 seconds
......@@ -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
......
......@@ -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", input)
dep.Log("Input: %s", indent.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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment