diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-15 15:59:29 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-15 15:59:29 -0400 |
commit | 1bbb5265be24476faa2d44f8538918708391bde8 (patch) | |
tree | 5f1b30ec8a4cf1dfa1366b7945accb502add43ba /model/client.go | |
parent | bbb0607e1ddf3e3d530095ba2aa28abd9c49a3e4 (diff) | |
parent | 23a1311ef5f9ecac0a250419a49e74b290e63516 (diff) | |
download | chat-1bbb5265be24476faa2d44f8538918708391bde8.tar.gz chat-1bbb5265be24476faa2d44f8538918708391bde8.tar.bz2 chat-1bbb5265be24476faa2d44f8538918708391bde8.zip |
Merge pull request #681 from mattermost/PLT-12-log
PLT-12 Adding server logs viewer to admin console
Diffstat (limited to 'model/client.go')
-rw-r--r-- | model/client.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/model/client.go b/model/client.go index c355b90f5..5aac09289 100644 --- a/model/client.go +++ b/model/client.go @@ -338,6 +338,15 @@ func (c *Client) GetAudits(id string, etag string) (*Result, *AppError) { } } +func (c *Client) GetLogs() (*Result, *AppError) { + if r, err := c.DoGet("/admin/logs", "", ""); err != nil { + return nil, err + } else { + return &Result{r.Header.Get(HEADER_REQUEST_ID), + r.Header.Get(HEADER_ETAG_SERVER), ArrayFromJson(r.Body)}, nil + } +} + func (c *Client) CreateChannel(channel *Channel) (*Result, *AppError) { if r, err := c.DoPost("/channels/create", channel.ToJson()); err != nil { return nil, err |