mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
All of the changes for func logs
This commit is contained in:
19
docs/operating/logs/README.md
Normal file
19
docs/operating/logs/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
# Function logs
|
||||
|
||||
We currently support the following function logs stores and they are passed in via the `LOGSTORE_URL` environment variable. For example:
|
||||
Maximum size of single log entry: 4Mb
|
||||
|
||||
|
||||
```sh
|
||||
docker run -e "LOGSTORE_URL=bolt:///functions/logs/bolt.db" ...
|
||||
```
|
||||
|
||||
## [Bolt](https://github.com/boltdb/bolt) (default)
|
||||
|
||||
URL: `bolt:///functions/logs/bolt.db`
|
||||
|
||||
Bolt is an embedded database which stores to disk. If you want to use this, be sure you don't lose the data directory by mounting
|
||||
the directory on your host. eg: `docker run -v $PWD/data:/functions/data -e LOGSTORE_URL=bolt:///functions/data/bolt.db ...`
|
||||
|
||||
[More on BoltDB](../databases/boltdb.md)
|
||||
@@ -317,6 +317,52 @@ paths:
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
|
||||
/calls/{call}/log:
|
||||
get:
|
||||
summary: Get call logs
|
||||
description: Get call logs
|
||||
tags:
|
||||
- Call
|
||||
- Log
|
||||
parameters:
|
||||
- name: call
|
||||
description: Call ID.
|
||||
required: true
|
||||
type: string
|
||||
in: path
|
||||
responses:
|
||||
200:
|
||||
description: Log found
|
||||
schema:
|
||||
$ref: '#/definitions/LogWrapper'
|
||||
404:
|
||||
description: Log not found.
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
delete:
|
||||
summary: Delete call log entry
|
||||
description: Delete call log entry
|
||||
tags:
|
||||
- Call
|
||||
- Log
|
||||
parameters:
|
||||
- name: call
|
||||
description: Call ID.
|
||||
required: true
|
||||
type: string
|
||||
in: path
|
||||
responses:
|
||||
202:
|
||||
description: Log delete request accepted
|
||||
404:
|
||||
description: Does not exist.
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
default:
|
||||
description: Unexpected error
|
||||
schema:
|
||||
$ref: '#/definitions/Error'
|
||||
|
||||
/calls/{call}:
|
||||
get:
|
||||
summary: Get call information
|
||||
@@ -519,6 +565,25 @@ definitions:
|
||||
$ref: '#/definitions/Call'
|
||||
description: "Call object."
|
||||
|
||||
|
||||
LogWrapper:
|
||||
type: object
|
||||
required:
|
||||
- log
|
||||
properties:
|
||||
log:
|
||||
$ref: '#/definitions/Log'
|
||||
description: "Call log entry."
|
||||
|
||||
Log:
|
||||
type: object
|
||||
properties:
|
||||
call_id:
|
||||
type: string
|
||||
description: Call UUID ID
|
||||
log:
|
||||
type: string # maybe bytes, long logs wouldn't fit into string type
|
||||
|
||||
Call:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user