@Controller @Profile(value="resthub-client-logging") public class LogController extends Object
Constructor and Description |
---|
LogController() |
Modifier and Type | Method and Description |
---|---|
void |
log(Logs logs,
String userAgent)
Multiple log handling
REST webservice published : POST /api/logs |
void |
logAction(Log log,
String userAgent)
Single log handling
REST webservice published : POST /api/log |
void |
setLogStrategy(LogStrategy logStrategy)
You can inject another LogStrategy bean in order to customize log handling
|
@Inject @Named(value="defaultLogStrategy") public void setLogStrategy(LogStrategy logStrategy)
@RequestMapping(value="api/log", method=POST) @ResponseStatus(value=OK) public void logAction(@RequestBody Log log, @RequestHeader(value="User-Agent") String userAgent)
log
- the log sent by the clientuserAgent
- user Agent sent by the cient in Header@RequestMapping(value="api/logs", method=POST) @ResponseStatus(value=OK) public void log(@RequestBody Logs logs, @RequestHeader(value="User-Agent") String userAgent)
logs
- An array of logs sent by the clientuserAgent
- user Agent sent by the cient in HeaderCopyright © 2009–2014. All rights reserved.