type Logs … // Install func registers the logs handler. func (l Logs) Install(c *restful.Container) { … } func logFileHandler(req *restful.Request, resp *restful.Response) { … } func logFileListHandler(req *restful.Request, resp *restful.Response) { … } // logFileNameIsTooLong checks filename length, returns true if it's longer than 255. // cause http.ServeFile returns default error code 500 except for NotExist and Forbidden, but we need to separate the real 500 from oversize filename here. func logFileNameIsTooLong(filePath string) bool { … }