-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add logLevel and logRetryAfterSeconds options when initializing the lib #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -149,8 +149,10 @@ class AdobeState { | |||||
| * @param {string} apikey the apikey for the Adobe State Store | ||||||
| * @param {string} env the Adobe environment (AIO_CLI_ENV) | ||||||
| * @param {('amer'|'apac'|'emea')} [region] the region for the Adobe State Store. defaults to 'amer' | ||||||
| * @param {string} [logLevel] the log level for the HttpExponentialBackoff instance | ||||||
| * @param {number} [logRetryAfterSeconds] if the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. | ||||||
|
||||||
| * @param {number} [logRetryAfterSeconds] if the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. | |
| * @param {number} [logRetryAfterSeconds] If the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,7 @@ const logger = require('@adobe/aio-lib-core-logging')('@adobe/aio-lib-state', { | |||||
|
|
||||||
| const utils = require('./utils') | ||||||
| const { AdobeState } = require('./AdobeState') | ||||||
| const DEFAULT_LOG_RETRY_AFTER_SECONDS = 10 | ||||||
|
|
||||||
| /* *********************************** typedefs *********************************** */ | ||||||
| /** | ||||||
|
|
@@ -43,15 +44,24 @@ const { AdobeState } = require('./AdobeState') | |||||
| * namespace and auth can also be passed through environment variables: | ||||||
| * `__OW_NAMESPACE` and `__OW_API_KEY` | ||||||
| * @param {string} [config.region] optional region to use, accepted values: `amer` (default), `emea`, `apac` | ||||||
| * @param {string} [config.logLevel] optional log level for the HttpExponentialBackoff instance | ||||||
| * @param {number} [config.logRetryAfterSeconds] Defaults to 10. if the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. | ||||||
|
||||||
| * @param {number} [config.logRetryAfterSeconds] Defaults to 10. if the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. | |
| * @param {number} [config.logRetryAfterSeconds] Defaults to 10. If the request has to retry because of a 429, it will log the retry attempt as a warning if the Retry-After value is greater than this number. Set to 0 to disable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The capitalization of "if" should be "If" to maintain consistency with standard sentence capitalization in documentation.