summaryrefslogtreecommitdiff
path: root/libpod/container_log_linux.go
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2019-05-20 13:58:31 -0400
committerPeter Hunt <pehunt@redhat.com>2019-05-28 11:10:57 -0400
commit51bdf29f0493827ce3eb278a193d0a7402add896 (patch)
tree685eb00a699d96bc0f5174ee7b9b7d51d6a851b9 /libpod/container_log_linux.go
parent02f971131a3bb71615d15a45df808edd0fa88266 (diff)
downloadpodman-51bdf29f0493827ce3eb278a193d0a7402add896.tar.gz
podman-51bdf29f0493827ce3eb278a193d0a7402add896.tar.bz2
podman-51bdf29f0493827ce3eb278a193d0a7402add896.zip
Address comments
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'libpod/container_log_linux.go')
-rw-r--r--libpod/container_log_linux.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index 47dc44b8f..3b7945e0c 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -1,4 +1,5 @@
//+build linux
+//+build systemd
package libpod
@@ -22,8 +23,8 @@ const (
// bufLen is the length of the buffer to read from a k8s-file
// formatted log line
- // It consists of conmon.TSBUFLEN+2+conmon.STDIOBUFSIZE+'\0'
- bufLen = 44 + 2 + 8192 + 1
+ // let's set it as 2k just to be safe if k8s-file format ever changes
+ bufLen = 16384
)
func (c *Container) readFromJournal(options *LogOptions, logChannel chan *LogLine) error {
@@ -84,7 +85,7 @@ func (c *Container) readFromJournal(options *LogOptions, logChannel chan *LogLin
func journalFormatter(entry *journal.JournalEntry) (string, error) {
usec := entry.RealtimeTimestamp
timestamp := time.Unix(0, int64(usec)*int64(time.Microsecond))
- output := timestamp.Format(readLogTimeFormat) + " "
+ output := timestamp.Format(logTimeFormat) + " "
priority, ok := entry.Fields["PRIORITY"]
if !ok {
return "", errors.Errorf("no PRIORITY field present in journal entry")