Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miton18
Copy link
Contributor

@miton18 miton18 commented Feb 20, 2025

No description provided.

@miton18 miton18 force-pushed the feat/resource-logs-stream branch from 2879675 to acf3df6 Compare February 21, 2025 13:53
Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a 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.

* @returns {URL}
*/
getUrl() {
return this.buildUrl(`/v4/logs/organisations/${this._ownerId}/resources/${this._addonId}/logs`, { ...this._options,
Copy link
Contributor

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?

// 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
Copy link
Contributor

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?

@@ -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}
Copy link
Contributor

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?

@@ -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}
Copy link
Contributor

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?

@miton18 miton18 force-pushed the feat/resource-logs-stream branch from acf3df6 to 3d7fe0e Compare February 24, 2025 08:33
Copy link
Contributor

@pdesoyres-cc pdesoyres-cc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants