Skip to content

Make logging optional #24

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

Open
WeeJeWel opened this issue Aug 25, 2024 · 9 comments
Open

Make logging optional #24

WeeJeWel opened this issue Aug 25, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@WeeJeWel
Copy link

WeeJeWel commented Aug 25, 2024

Thank you for this amazing library!

I'm working on a CLI utility to automate downloading iCloud Drive to a NAS.

Can the console.debug entries be replaced by the debug module, or a options.debug = console.debug parameter, so it can be disabled?

Thank you!

@foxt foxt self-assigned this Aug 25, 2024
@foxt foxt added the enhancement New feature or request label Aug 25, 2024
@foxt
Copy link
Owner

foxt commented Aug 25, 2024

Fixed in 622f66c. npm isn't letting me publish right now for some reason so it's not on there just yet.

@foxt foxt closed this as completed Aug 25, 2024
@WeeJeWel
Copy link
Author

Wow, that was fast! Thank you! 🙏🏻

@WeeJeWel
Copy link
Author

@foxt Could you retry publishing to npm please?

@foxt
Copy link
Owner

foxt commented Aug 31, 2024

thanks for the reminder, should be up now.

@WeeJeWel
Copy link
Author

Awesome, thank you!

@WeeJeWel
Copy link
Author

There seems to be a new bug:

TypeError: this.log is not a function
    at iCloudAuthenticationStore.loadTrustToken (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/auth/authStore.js:49:18)
    at iCloudService.authenticate (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/index.js:164:24)
    at iCloudBackup.authenticate (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:63:20)
    at async iCloudBackup.backupDrive (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:84:5)
    at async Promise.all (index 0)
    at async file:///Users/emile/Git/@weejewel/node-icloud-backup/bin/icloud-backup.mjs:30:1

@constancebello
Copy link

There seems to be a new bug:

TypeError: this.log is not a function
    at iCloudAuthenticationStore.loadTrustToken (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/auth/authStore.js:49:18)
    at iCloudService.authenticate (/Users/emile/Git/@weejewel/node-icloud-backup/node_modules/icloudjs/build/index.js:164:24)
    at iCloudBackup.authenticate (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:63:20)
    at async iCloudBackup.backupDrive (file:///Users/emile/Git/@weejewel/node-icloud-backup/lib/iCloudBackup.mjs:84:5)
    at async Promise.all (index 0)
    at async file:///Users/emile/Git/@weejewel/node-icloud-backup/bin/icloud-backup.mjs:30:1

I am also getting this error on 1.6.1.

@MarSoft
Copy link

MarSoft commented Dec 14, 2024

The patch results in an error when trying to login: Uncaught TypeError: this.log is not a function
Because the log function is declared on iCloudStore but not on iCloudAuthenticationStore.

@foxt foxt reopened this Dec 18, 2024
@foxt
Copy link
Owner

foxt commented Dec 19, 2024

hi all, apologies it took so long,

can you try again with 1.6.2

(and in the meantime i'll see if i can refactor and enable ts strict mode 😬)

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

No branches or pull requests

4 participants