percolatestudio / meteor-synced-cron

A simple cron system for Meteor. It supports syncronizing jobs between multiple processes.
https://atmospherejs.com/littledata/synced-cron
MIT License
499 stars 110 forks source link

I can't seem to switch logging off #132

Closed salpulse closed 6 years ago

salpulse commented 6 years ago

I've got the following:

    SyncedCron.config({ log: false });
    SyncedCron.add({
      name: 'NotificationProcessor.process',
      schedule: laterParser => laterParser.text('every 1 minute'),
      job: () => {
        notificationProcessor._process();
      },
    });
    SyncedCron.start();

but my server logs still have logs produced.

I20180525-17:08:00.012(10) (percolate_synced-cron.js:87) SyncedCron: Finished "NotificationProcessor.process".
I20180525-17:09:00.006(10) (percolate_synced-cron.js:87) SyncedCron: Starting "NotificationProcessor.process".

I dumped SyncedCron.options and they appear to be correct. Not sure why the config is not being picked up

I20180525-17:14:44.451(10)? {
I20180525-17:14:44.451(10)?     "log": false,
I20180525-17:14:44.451(10)?     "logger": null,
I20180525-17:14:44.451(10)?     "collectionName": "cronHistory",
I20180525-17:14:44.451(10)?     "utc": false,
I20180525-17:14:44.451(10)?     "collectionTTL": 172800
I20180525-17:14:44.451(10)? }
TheGame2500 commented 6 years ago

Should now work at https://atmospherejs.com/littledata/synced-cron

chdagenais commented 5 years ago

Still having this exact same issue. Ended up using custom logger and checking if(Meteor.isDevelopment) before logging

CyberCyclone commented 5 years ago

This is still an issue. Default logger ignores "log: false".

TheGame2500 commented 5 years ago

https://github.com/percolatestudio/meteor-synced-cron#migrated-from-percolatesynced-cron-littledatasynced-cron

CyberCyclone commented 5 years ago

This wasn't a migration since we only added the package about 2 months ago. We went straight to the "littledata" version.