@Path(value="/tail") @Produces(value="application/json") @RolesAllowed(value="") public class TailerAPI extends Object
| Constructor and Description |
|---|
TailerAPI() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
get(String file,
Integer fromLine,
Integer numberOfLines)
Tails the file with name
file. |
@GET
public javax.ws.rs.core.Response get(@QueryParam(value="f")
String file,
@QueryParam(value="l")
Integer fromLine,
@QueryParam(value="n")
Integer numberOfLines)
throws IOException
file. fromLine is defined, the tail starts from
this defined line and the parameter numberOfLines is
ignored. numberOfLines is defined, this maximum
number of lines is returned from before the end of file, just like
tail -f -n [number].file - name of the file to tail from.fromLine - start line to tail from.numberOfLines - number of line to tail from the end of file.Response with a List of LogLineDTO
containing the tail information.IOException - if there is an error when reading the log file.Copyright © 2017. All rights reserved.