Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
03ebef58
Commit
03ebef58
authored
Feb 24, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.3.x'
parents
64fd322a
b1afd091
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
2 deletions
+34
-2
index.adoc
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
+13
-0
EndpointDocumentation.java
...mework/boot/actuate/hypermedia/EndpointDocumentation.java
+11
-1
http-response.snippet
.../springframework/restdocs/templates/http-response.snippet
+8
-0
production-ready-features.adoc
...oot-docs/src/main/asciidoc/production-ready-features.adoc
+2
-1
No files found.
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
View file @
03ebef58
...
...
@@ -34,6 +34,19 @@ include::{generated}/logfile/http-request.adoc[]
Example HTTP response:
include::{generated}/logfile/http-response.adoc[]
==== Partial content
You can use the `Range` header to retrieve part of the log file's content.
Example curl request:
include::{generated}/partial-logfile/curl-request.adoc[]
Example HTTP request:
include::{generated}/partial-logfile/http-request.adoc[]
Example HTTP response:
include::{generated}/partial-logfile/http-response.adoc[]
=== /docs
...
...
spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java
View file @
03ebef58
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import
org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
;
import
org.springframework.boot.actuate.endpoint.mvc.MvcEndpoints
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.restdocs.JUnitRestDocumentation
;
import
org.springframework.test.annotation.DirtiesContext
;
...
...
@@ -104,6 +105,15 @@ public class EndpointDocumentation {
.
andExpect
(
status
().
isOk
()).
andDo
(
document
(
"logfile"
));
}
@Test
public
void
partialLogfile
()
throws
Exception
{
this
.
mockMvc
.
perform
(
get
(
"/logfile"
).
accept
(
MediaType
.
TEXT_PLAIN
)
.
header
(
HttpHeaders
.
RANGE
,
"bytes=0-1024"
))
.
andExpect
(
status
().
isPartialContent
())
.
andDo
(
document
(
"partial-logfile"
));
}
@Test
public
void
endpoints
()
throws
Exception
{
...
...
spring-boot-actuator-docs/src/restdoc/resources/org/springframework/restdocs/templates/http-response.snippet
0 → 100644
View file @
03ebef58
[source,http,options="nowrap"]
----
HTTP/1.1 {{statusCode}} {{statusReason}}
{{#headers}}
{{name}}: {{value}}
{{/headers}}
{{responseBody}}
----
\ No newline at end of file
spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
View file @
03ebef58
...
...
@@ -118,7 +118,8 @@ unauthenticated connection or full message details when authenticated).
|`
logfile
`
|
Returns
the
contents
of
the
logfile
(
if
`
logging
.
file
`
or
`
logging
.
path
`
properties
have
been
set
).
Only
available
via
MVC
.
been
set
).
Only
available
via
MVC
.
Supports
the
use
of
the
HTTP
`
Range
`
header
to
retrieve
part
of
the
log
file
's content.
|true
|`metrics`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment