Authentication #170

Merged
bones7242 merged 43 commits from authentication into master 2017-09-29 02:29:22 +02:00
3 changed files with 33 additions and 31 deletions
Showing only changes of commit 7d0fda64f7 - Show all commits

View file

@ -1,19 +1,20 @@
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
{
"WalletConfig": {
"LbryClaimAddress": "none",
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"DefaultChannel": "none"
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"LbryClaimAddress": null,
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"DefaultChannel": null
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
},
"AnalyticsConfig":{
"GoogleId": "none"
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"GoogleId": null
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
},
"Database": {
"Database": "lbry",
"Username": "none",
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"Password": "none"
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"Username": null,
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
kauffj commented 2017-09-22 15:38:55 +02:00 (Migrated from github.com)
Review

Is there a reason this file uses "none" as a string instead of null or something falsier?

Is there a reason this file uses `"none"` as a string instead of `null` or something falsier?
bones7242 commented 2017-09-25 18:36:57 +02:00 (Migrated from github.com)
Review

I did it so that when I called the variable later, if l logged the variable and got 'none' I knew the variable had been created but wasn't updated with the proper value for the environment. Not very clean/efficient. I fixed this now. They are all set to null and a script runs through them when the server loads and prints their values so I can check them up front. (250ead165b)

I did it so that when I called the variable later, if l logged the variable and got 'none' I knew the variable had been created but wasn't updated with the proper value for the environment. Not very clean/efficient. I fixed this now. They are all set to `null` and a script runs through them when the server loads and prints their values so I can check them up front. (https://github.com/lbryio/spee.ch/pull/170/commits/250ead165bd51c4b9812d514c724d320f526d90c)
"Password": null
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
},
"Logging": {
"LogLevel": "none",
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"SlackErrorChannel": "none",
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"SlackInfoChannel": "none"
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"LogLevel": null,
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"SlackWebHook": null,
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"SlackErrorChannel": null,
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
"SlackInfoChannel": null
kauffj commented 2017-09-22 15:38:10 +02:00 (Migrated from github.com)
Review

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.

Great design here! Love that this makes it easy to use different channels on staging/dev and production as well as easy to change if forked.
bones7242 commented 2017-09-25 17:49:10 +02:00 (Migrated from github.com)
Review

👍

:+1:
}
}

View file

@ -12,10 +12,6 @@ module.exports = (winston, logLevel) => {
],
});
// winston.on('error', (err) => {
// console.log('unhandled exception in winston >> ', err);
// });
winston.error('Level 0');
winston.warn('Level 1');
winston.info('Level 2');

View file

@ -5,7 +5,8 @@ const SLACK_INFO_CHANNEL = config.get('Logging.SlackInfoChannel');
const winstonSlackWebHook = require('winston-slack-webhook').SlackWebHook;
module.exports = (winston) => {
// add a transport for errors
if (SLACK_WEB_HOOK) {
// add a transport for errors to slack
winston.add(winstonSlackWebHook, {
name : 'slack-errors-transport',
level : 'error',
@ -23,5 +24,9 @@ module.exports = (winston) => {
iconEmoji : ':nerd_face:',
});
// send test message
winston.error('Testing slack logging... slack logging is online.');
winston.error('Slack error logging is online.');
winston.info('Slack info logging is online.');
} else {
winston.error('Slack logging is not enabled because no SLACK_WEB_HOOK env var provided.');
}
};