Class LogsResource
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.apache.juneau.rest.servlet.RestServlet
org.apache.juneau.rest.servlet.BasicRestServlet
org.apache.juneau.microservice.resources.LogsResource
- All Implemented Interfaces:
- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable,- BasicUniversalConfig,- DefaultConfig,- DefaultHtmlConfig,- BasicRestOperations
REST resource for viewing and accessing log files.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic class
- 
Field SummaryFields inherited from class jakarta.servlet.http.HttpServletLEGACY_DO_HEAD
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionorg.apache.juneau.microservice.resources.LogsResource.RedirectToRootdeleteFile(String path) org.apache.juneau.microservice.resources.LogsResource.FileContentsdownloadFile(RestResponse res, String path) getFile(RestRequest req, String path) voidvoidviewFile(RestResponse res, String path, boolean highlight, String start, String end, String thread, String[] loggers, String[] severity) viewParsedEntries(RestRequest req, String path, String start, String end, String thread, String[] loggers, String[] severity) Methods inherited from class org.apache.juneau.rest.servlet.BasicRestServleterror, getFavIcon, getHtdoc, getStats, getSwaggerMethods inherited from class org.apache.juneau.rest.servlet.RestServletdestroy, doLog, getContext, getPath, getRequest, getResponse, init, log, log, service, setContextMethods inherited from class jakarta.servlet.http.HttpServletdoDelete, doGet, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, serviceMethods inherited from class jakarta.servlet.GenericServletgetInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
- 
Constructor Details- 
LogsResourcepublic LogsResource()
 
- 
- 
Method Details- 
init- Throws:
- Exception
 
- 
getFilepublic LogsResource.FileResource getFile(RestRequest req, @Path("/*") String path) throws NotFound, Exception 
- 
viewFilepublic void viewFile(RestResponse res, @Path("/*") String path, @Query(name="highlight",schema=@Schema(d="Add severity color highlighting.")) boolean highlight, @Query(name="start",schema=@Schema(d="Start timestamp (ISO8601, full or partial).\nDon\'t print lines logged before the specified timestamp.\nUse any of the following formats: yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddThh, yyyy-MM-ddThh:mm, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ss.SSS")) String start, @Query(name="end",schema=@Schema(d="End timestamp (ISO8601, full or partial).\nDon\'t print lines logged after the specified timestamp.\nUse any of the following formats: yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddThh, yyyy-MM-ddThh:mm, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ss.SSS")) String end, @Query(name="thread",schema=@Schema(d="Thread name filter.\nOnly show log entries with the specified thread name.")) String thread, @Query(name="loggers",schema=@Schema(d="Logger filter (simple class name).\nOnly show log entries if they were produced by one of the specified loggers.")) String[] loggers, @Query(name="severity",schema=@Schema(d="Severity filter.\nOnly show log entries with the specified severity.")) String[] severity) throws NotFound, MethodNotAllowed, IOException - Throws:
- NotFound
- MethodNotAllowed
- IOException
 
- 
viewParsedEntriespublic LogParser viewParsedEntries(RestRequest req, @Path("/*") String path, @Query(name="start",schema=@Schema(d="Start timestamp (ISO8601, full or partial).\nDon\'t print lines logged before the specified timestamp.\nUse any of the following formats: yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddThh, yyyy-MM-ddThh:mm, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ss.SSS")) String start, @Query(name="end",schema=@Schema(d="End timestamp (ISO8601, full or partial).\nDon\'t print lines logged after the specified timestamp.\nUse any of the following formats: yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddThh, yyyy-MM-ddThh:mm, yyyy-MM-ddThh:mm:ss, yyyy-MM-ddThh:mm:ss.SSS")) String end, @Query(name="thread",schema=@Schema(d="Thread name filter.\nOnly show log entries with the specified thread name.")) String thread, @Query(name="loggers",schema=@Schema(d="Logger filter (simple class name).\nOnly show log entries if they were produced by one of the specified loggers.")) String[] loggers, @Query(name="severity",schema=@Schema(d="Severity filter.\nOnly show log entries with the specified severity.")) String[] severity) throws NotFound, IOException - Throws:
- NotFound
- IOException
 
- 
downloadFilepublic org.apache.juneau.microservice.resources.LogsResource.FileContents downloadFile(RestResponse res, @Path("/*") String path) throws NotFound, MethodNotAllowed - Throws:
- NotFound
- MethodNotAllowed
 
- 
deleteFilepublic org.apache.juneau.microservice.resources.LogsResource.RedirectToRoot deleteFile(@Path("/*") String path) throws MethodNotAllowed - Throws:
- MethodNotAllowed
 
 
-