Skip to content

Commit

Permalink
Add logs.restApi
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericbarthelet committed Sep 30, 2020
1 parent 8293cc4 commit 388644b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,6 @@ function handleLogs() {
level = 'OFF';
} else if (logs.level) {
level = logs.level;
if (!apiGatewayValidLogLevels.has(level)) {
throw new ServerlessError(
`provider.logs.restApi.level is set to an invalid value. Support values are ${Array.from(
apiGatewayValidLogLevels
).join(', ')}, got ${level}.`
);
}
}

const accessLogging = logs.accessLogging == null ? true : logs.accessLogging;
Expand Down
12 changes: 12 additions & 0 deletions lib/plugins/aws/provider/awsProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,18 @@ class AwsProvider {
},
],
},
restApi: {
type: 'object',
properties: {
accessLogging: { type: 'boolean' },
executionLogging: { type: 'boolean' },
format: { type: 'string' },
fullExecutionData: { type: 'boolean' },
level: { enum: ['INFO', 'ERROR'] },
role: { $ref: '#/definitions/awsArn' },
roleManagedExternally: { type: 'boolean' },
},
},
websocket: {
oneOf: [
{ type: 'boolean' },
Expand Down

0 comments on commit 388644b

Please sign in to comment.