mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: introducing docker-syslog driver as default logger (#1189)
* fn: introducing docker-syslog driver as default logger With this change, fn-agent prefers RFC2454 docker-syslog driver for logging stdout/stderr from containers. The advantage of this is to offload it to docker itself instead of streaming stderr along with stdout, which gets multiplexed through single connection via docker-API. The change will need support from FDKs in order to log correct call-id and supress '\n' that splits syslog lines.
This commit is contained in:
@@ -86,6 +86,21 @@ type RunResult interface {
|
||||
Status() string
|
||||
}
|
||||
|
||||
// Logger Tags for container
|
||||
type LoggerTag struct {
|
||||
Name string
|
||||
Value string
|
||||
}
|
||||
|
||||
// Logger Configuration for container
|
||||
type LoggerConfig struct {
|
||||
// Log Sink URL
|
||||
URL string
|
||||
|
||||
// Log Tag Pairs
|
||||
Tags []LoggerTag
|
||||
}
|
||||
|
||||
// The ContainerTask interface guides container execution across a wide variety of
|
||||
// container oriented runtimes.
|
||||
type ContainerTask interface {
|
||||
@@ -136,6 +151,9 @@ type ContainerTask interface {
|
||||
// leaves it unset.
|
||||
WorkDir() string
|
||||
|
||||
// Logger Config to use in driver
|
||||
LoggerConfig() LoggerConfig
|
||||
|
||||
// Close is used to perform cleanup after task execution.
|
||||
// Close should be safe to call multiple times.
|
||||
Close()
|
||||
|
||||
Reference in New Issue
Block a user