Package org.opennms.web.rest.v1
Class LogRestService
- java.lang.Object
-
- org.opennms.web.rest.v1.LogRestService
-
@Component @Path("logs") public class LogRestService extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_NUM_LINES
static int
MAX_NUM_LINES
-
Constructor Summary
Constructors Constructor Description LogRestService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
getFileContents(String fileName, Integer numLines, boolean reverse, javax.ws.rs.core.SecurityContext securityContext)
List<String>
getLogFiles(javax.ws.rs.core.SecurityContext securityContext)
static javax.ws.rs.core.Response
logFileContents(Path path, int numLastLinesToRead, boolean reverse)
-
-
-
Field Detail
-
DEFAULT_NUM_LINES
public static final int DEFAULT_NUM_LINES
- See Also:
- Constant Field Values
-
MAX_NUM_LINES
public static final int MAX_NUM_LINES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogFiles
@GET @Path("/") @Produces("application/json") public List<String> getLogFiles(@Context javax.ws.rs.core.SecurityContext securityContext)
-
getFileContents
@GET @Path("/contents") public javax.ws.rs.core.Response getFileContents(@QueryParam("f") String fileName, @QueryParam("n") Integer numLines, @QueryParam("reverse") @DefaultValue("true") boolean reverse, @Context javax.ws.rs.core.SecurityContext securityContext)
-
logFileContents
public static javax.ws.rs.core.Response logFileContents(Path path, int numLastLinesToRead, boolean reverse)
-
-