-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move restic repo init into restic pkg (#4068)
* Move restic repo init into restic pkg * Address review comments
- Loading branch information
Vaibhav Kamra
authored and
Ilya Kislenko
committed
Oct 10, 2018
1 parent
9b69028
commit cfa7d63
Showing
4 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package format | ||
|
||
import ( | ||
"regexp" | ||
"strings" | ||
|
||
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
func Log(podName string, containerName string, output string) { | ||
if output != "" { | ||
logs := regexp.MustCompile("[\r\n]").Split(output, -1) | ||
for _, l := range logs { | ||
if strings.TrimSpace(l) != "" { | ||
log.Info("Pod: ", podName, " Container: ", containerName, " Out: ", l) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters