Add support for getting a server's log file via the API

This commit is contained in:
Dane Everitt
2019-04-06 12:27:44 -07:00
parent b6bc9adf29
commit 7d67be8382
5 changed files with 152 additions and 1 deletions

View File

@@ -191,6 +191,11 @@ func FromConfiguration(data []byte, cfg DockerConfiguration) (*Server, error) {
return s, nil
}
// Reads the log file for a server up to a specified number of bytes.
func (s *Server) ReadLogfile(len int64) ([]string, error) {
return s.Environment().Readlog(len)
}
func (s *Server) Environment() Environment {
return s.environment
}