Conversation
|
@ac360 so this implementation doesn't actually console.log the logs. Is it meant to be used only programmatically and not via the CLI? |
|
Sorry, bad PR description. The answer is yes and no. As always, it's up to the context to handle the outputs. In order to make it easier for contexts (cli, gui) to handle outputs, I've created a standard format for the outputs of both
{
logs: [
{
timestamp: '2019-09-22T22:21:30.645Z',
message: '1',
meta: { requestId: '1981230981j1' }
}
]
}
{
metrics: [
{
type: 'keyVal', // A list of keys and values meant to populate line/bar charts
name: 'Invocations', // The metric name
keys: [
'2019-09-22T22:21:30.645Z'
],
values: [
6
]
}
]
} |
|
I like the idea of Context controlling logging. This is related to an issue @laardee opened here: |
|
Closing since I assume this is no longer relevant. |
This is a first pass at adding experimental logs and metrics methods.
One of the goals is to have standard inputs and outputs across
logs()andmetrics()methods across all components. Here is an attempt at that.