Skip to content

Commit

Permalink
Merge pull request deis#3037 from carmstrong/feat-logspout_custom_dat…
Browse files Browse the repository at this point in the history
…etime

feat(logspout): use custom datetime
  • Loading branch information
carmstrong committed Feb 7, 2015
2 parents c6fa691 + 261f78d commit 73828dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions logspout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ By default, routes are ephemeral. But if you mount a volume to `/mnt/routes`, th

See [Routes Resource](#routes-resource) for all options.

#### Using a custom timestamp format

By default, logspout will use the timestamp format `2006-01-02T15:04:05MST`. A custom format can be specified by setting the `DATETIME_FORMAT` environment variable.

## HTTP API

### Streaming Endpoints
Expand Down
2 changes: 1 addition & 1 deletion logspout/logspout.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func syslogStreamer(target Target, types []string, logstream chan *Log) {
// HACK: Go's syslog package hardcodes the log format, so let's send our own message
_, err = fmt.Fprintf(conn,
"%s %s[%s]: %s",
time.Now().Format(dtime.DEIS_DATETIME_FORMAT),
time.Now().Format(getopt("DATETIME_FORMAT", dtime.DEIS_DATETIME_FORMAT)),
tag,
pid,
logline.Data)
Expand Down

0 comments on commit 73828dd

Please sign in to comment.