I’m developing a plugin and was wondering if the logger property of th global inkdrop object has moved somewhere or is not available anymore?
When i open the console in Inkdrop and try to manually access logger (inkdrop.logger) it is also undefined. So I presume it has nothing to do with my plugin setup.
Any help would be appreciated on how to log things. Thank you!
Note that it is basically for internal use. For example, logger.debug('foo') outputs nothing in the production builds.
Can you tell me why would you like to use it?
Thanks for the answer. So that module is different than the one where the store and notificiations objects e.g. are attached to?
I’m working on a sync/import/export plugin for Todoist. It works quite well so far. I was just wondering where to log some information about what the plugin was doing and how to log when sync errors occured. Such as Todois API responses.
I do notify the user with notifications if something goes wrong but I guess it would be nice to have some sort of log to follow the synchornisatoin trace to be able to say what roughly failed.
It’s correct that you notify the user with notifications for exceptions.
Again, the logger module of Inkdrop is basically for internal use.
Instead, you could use “debug” module for logging your plugin process:
I’m still doing some refactoring, better exception and error management as well as looking into the library you linked to swap out the internal logger. I will probably split parts into separate modules but feature wise it’s pretty much as complete as what Inkdrop and Todoist allow. The Readme is done. I’ll hopefully get around to polish it soon to be able to publish a first version.
Hi Takuya,
I’ve published a first version (todoist-sync).
I will still rework the code into multiple modules in the coming days but it won’t change the functionality.
I’ve been using it daily for a while now and enjoy working with it.
There is also a super small other plugin for permanently deleting notes by skipping trash I made as well (perma-delete).
Thanks for publishing the plugins! A plugin developer license has been applied to you XD
BTW, I’ve tried to use the todoist-sync but got an error on loading:
Oh, I’ll fix that. Must’ve accidentally added it to the dev dependencies. And since I symlinked the dev version to my local Inkdrop I probably never realised.
Alright, fixed. Installed the official version from ipm for testing and Inkdrop loads fine now. It was the same issue for both plugins. Thanks for making me aware of that!