-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(logs): support resource logs #129
base: master
Are you sure you want to change the base?
Conversation
2879675
to
acf3df6
Compare
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.
Nice PR, thank you @miton18. I have just a few comments.
esm/streams/resource-logs.js
Outdated
* @returns {URL} | ||
*/ | ||
getUrl() { | ||
return this.buildUrl(`/v4/logs/organisations/${this._ownerId}/resources/${this._addonId}/logs`, { ...this._options, |
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.
nitpick: can you move the ...this._options
to the next line?
esm/streams/resource-logs.js
Outdated
// in case of pause() then resume(): | ||
// we don' t want N another logs, we want the initial passed number less the events count already received | ||
limit: this._computedLimit(), | ||
service: 'all' // TODO: debug |
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.
question: this TODO is still valid? what do we have to debug?
esm/streams/application-logs.js
Outdated
@@ -88,7 +88,7 @@ export class ApplicationLogStream extends CleverCloudSse { | |||
/** | |||
* shortcut for .on('APPLICATION_LOG', (event) => ...) | |||
* @param {Function} fn which handle logs | |||
* @returns {any} | |||
* @returns {ApplicationLogStream} |
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.
nitpick: you can do @returns {this}
instead.
fix: can you move that into a separate commit?
esm/streams/access-logs.js
Outdated
@@ -89,7 +89,7 @@ export class ApplicationAccessLogStream extends CleverCloudSse { | |||
/** | |||
* shortcut for .on('APPLICATION_LOG', (event) => ...) | |||
* @param {Function} fn which handle logs | |||
* @returns {any} | |||
* @returns {ApplicationAccessLogStream} |
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.
nitpick: you can do @returns {this}
instead.
fix: can you move that into a separate commit?
acf3df6
to
3d7fe0e
Compare
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.
LGTM
No description provided.