summaryrefslogtreecommitdiff
path: root/vendor/github.com/hpcloud/tail/util
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-02-06 09:07:51 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-02-09 15:27:52 +0000
commitfa9658cbfaa94fd5d0425041404e498c01db1aa3 (patch)
tree3cacae5b613692387780209a5d41b10c2edc0940 /vendor/github.com/hpcloud/tail/util
parent75914199f331a10eb7ed44de68c738515bdd5b2d (diff)
downloadpodman-fa9658cbfaa94fd5d0425041404e498c01db1aa3.tar.gz
podman-fa9658cbfaa94fd5d0425041404e498c01db1aa3.tar.bz2
podman-fa9658cbfaa94fd5d0425041404e498c01db1aa3.zip
podman logs: fix tailing
Fix issues with tailing of container logs as described in issue #16. Also add in the ability to use a duration or known time stamp formats for the --since flag. Signed-off-by: baude <bbaude@redhat.com> Closes: #317 Approved by: mheon
Diffstat (limited to 'vendor/github.com/hpcloud/tail/util')
-rw-r--r--vendor/github.com/hpcloud/tail/util/util.go48
1 files changed, 0 insertions, 48 deletions
diff --git a/vendor/github.com/hpcloud/tail/util/util.go b/vendor/github.com/hpcloud/tail/util/util.go
deleted file mode 100644
index 54151fe39..000000000
--- a/vendor/github.com/hpcloud/tail/util/util.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2015 HPE Software Inc. All rights reserved.
-// Copyright (c) 2013 ActiveState Software Inc. All rights reserved.
-
-package util
-
-import (
- "fmt"
- "log"
- "os"
- "runtime/debug"
-)
-
-type Logger struct {
- *log.Logger
-}
-
-var LOGGER = &Logger{log.New(os.Stderr, "", log.LstdFlags)}
-
-// fatal is like panic except it displays only the current goroutine's stack.
-func Fatal(format string, v ...interface{}) {
- // https://github.com/hpcloud/log/blob/master/log.go#L45
- LOGGER.Output(2, fmt.Sprintf("FATAL -- "+format, v...)+"\n"+string(debug.Stack()))
- os.Exit(1)
-}
-
-// partitionString partitions the string into chunks of given size,
-// with the last chunk of variable size.
-func PartitionString(s string, chunkSize int) []string {
- if chunkSize <= 0 {
- panic("invalid chunkSize")
- }
- length := len(s)
- chunks := 1 + length/chunkSize
- start := 0
- end := chunkSize
- parts := make([]string, 0, chunks)
- for {
- if end > length {
- end = length
- }
- parts = append(parts, s[start:end])
- if end == length {
- break
- }
- start, end = end, end+chunkSize
- }
- return parts
-}