diff --git a/config/env/development.js b/config/env/development.js
index 0b4a64e9..92b656d6 100644
--- a/config/env/development.js
+++ b/config/env/development.js
@@ -16,8 +16,20 @@ module.exports = {
fileLogger: {
directoryPath: process.cwd(),
fileName: 'app.log',
- maxsize: 10485760,
- maxFiles: 2,
+ maxsize: 2097152,
+ maxFiles: 20,
+ json: false
+ }
+ },
+ logAnnounce: {
+ // logging with Morgan - https://github.com/expressjs/morgan
+ // Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
+ format: 'dev',
+ fileLogger: {
+ directoryPath: process.cwd(),
+ fileName: 'announce.log',
+ maxsize: 2097152,
+ maxFiles: 20,
json: false
}
},
diff --git a/config/env/production.js b/config/env/production.js
index cc282b53..ef0e2789 100644
--- a/config/env/production.js
+++ b/config/env/production.js
@@ -38,8 +38,20 @@ module.exports = {
fileLogger: {
directoryPath: process.env.LOG_DIR_PATH || process.cwd(),
fileName: process.env.LOG_FILE || 'app.log',
- maxsize: 10485760,
- maxFiles: 2,
+ maxsize: 2097152,
+ maxFiles: 20,
+ json: false
+ }
+ },
+ logAnnounce: {
+ // logging with Morgan - https://github.com/expressjs/morgan
+ // Can specify one of 'combined', 'common', 'dev', 'short', 'tiny'
+ format: process.env.LOG_FORMAT || 'combined',
+ fileLogger: {
+ directoryPath: process.env.LOG_DIR_PATH || process.cwd(),
+ fileName: process.env.LOG_ANNOUNCE_FILE || 'announce.log',
+ maxsize: 2097152,
+ maxFiles: 20,
json: false
}
},
diff --git a/config/env/torrents.js b/config/env/torrents.js
index ee63c902..850c7566 100644
--- a/config/env/torrents.js
+++ b/config/env/torrents.js
@@ -1256,24 +1256,24 @@ module.exports = {
* @mailTicketRepliesPerPage: mail ticket replies list page settings
*/
itemsPerPage: {
- topicsPerPage: 10,
- repliesPerPage: 10,
- topicsSearchPerPage: 10,
- torrentsPerPage: 15,
- torrentsCommentsPerPage: 10,
- makeGroupTorrentsPerPage: 10,
+ topicsPerPage: 25,
+ repliesPerPage: 20,
+ topicsSearchPerPage: 20,
+ torrentsPerPage: 20,
+ torrentsCommentsPerPage: 20,
+ makeGroupTorrentsPerPage: 20,
tracesPerPage: 30,
- adminUserListPerPage: 15,
- collectionsListPerPage: 6,
- backupFilesListPerPage: 15,
- torrentPeersListPerPage: 15,
+ adminUserListPerPage: 20,
+ collectionsListPerPage: 9,
+ backupFilesListPerPage: 20,
+ torrentPeersListPerPage: 20,
- uploaderUserListPerPage: 15,
+ uploaderUserListPerPage: 20,
messageBoxListPerPage: 10,
followListPerPage: 30,
requestListPerPage: 15,
- requestCommentsPerPage: 10,
+ requestCommentsPerPage: 20,
homeOrderTorrentListPerType: 9,
homeNewestTorrentListPerType: 14,
@@ -1284,9 +1284,9 @@ module.exports = {
examinationUserListPerPage: 20,
messageTicketsListPerPage: 15,
- messageTicketRepliesPerPage: 10,
+ messageTicketRepliesPerPage: 20,
mailTicketsListPerPage: 15,
- mailTicketRepliesPerPage: 10
+ mailTicketRepliesPerPage: 20
},
/**
diff --git a/config/lib/debug.js b/config/lib/debug.js
index 1a1b6874..7289791e 100644
--- a/config/lib/debug.js
+++ b/config/lib/debug.js
@@ -2,22 +2,55 @@
var path = require('path'),
chalk = require('chalk'),
+ logger = require('./logger'),
+ loggerAnnounce = require('./loggerAnnounce'),
moment = require('moment'),
config = require(path.resolve('./config/config'));
var appConfig = config.meanTorrentConfig.app;
+module.exports.colorFunctionList = {
+ red: chalk.red,
+ error: chalk.red,
+ blue: chalk.blue,
+ yellow: chalk.yellow,
+ green: chalk.green
+};
+
/**
* debug
* @param obj
* @param section
*/
-module.exports.info = function (obj, section) {
+module.exports.info = function (obj, section = undefined, colorFunction = undefined, isAnnounce = false) {
if (appConfig.showDebugLog) {
- if (section) {
- console.log(section);
+ var tools = isAnnounce ? loggerAnnounce : logger;
+
+ if (!colorFunction) {
+ if (typeof obj !== 'object') {
+ tools.info('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '') + ' - ' + obj);
+ } else if (Array.isArray(obj)) {
+ tools.info('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : ''));
+ obj.forEach(function (a) {
+ tools.info(a + '');
+ });
+ } else {
+ tools.info('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : ''));
+ tools.info(obj);
+ }
+ } else {
+ if (typeof obj !== 'object') {
+ tools.info(colorFunction('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '') + ' - ' + obj));
+ } else if (Array.isArray(obj)) {
+ tools.info(colorFunction('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
+ obj.forEach(function (a) {
+ tools.info(a + '');
+ });
+ } else {
+ tools.info(colorFunction('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
+ tools.info(obj);
+ }
}
- console.log(obj);
}
};
@@ -26,11 +59,8 @@ module.exports.info = function (obj, section) {
* @param obj
* @param section
*/
-module.exports.debug = function (obj, section) {
- if (appConfig.showDebugLog) {
- console.log('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : ''));
- console.log(obj);
- }
+module.exports.debug = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, undefined, isAnnounce);
};
/**
@@ -38,15 +68,9 @@ module.exports.debug = function (obj, section) {
* @param obj
* @param section
*/
-module.exports.debugGreen = function (obj, section) {
- if (appConfig.showDebugLog) {
- console.log(chalk.green('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
- if (typeof obj === 'string') {
- console.log(chalk.green(obj));
- } else {
- console.log(obj);
- }
- }
+module.exports.debugGreen = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, this.colorFunctionList.green, isAnnounce);
+
};
/**
@@ -54,18 +78,17 @@ module.exports.debugGreen = function (obj, section) {
* @param obj
* @param section
*/
-module.exports.debugRed = function (obj, section) {
- if (appConfig.showDebugLog) {
- console.log(chalk.red('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
- if (typeof obj === 'string') {
- console.log(chalk.red(obj));
- } else {
- console.log(obj);
- }
- }
+module.exports.debugRed = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, this.colorFunctionList.red, isAnnounce);
};
-module.exports.debugError = function (obj, section) {
- this.debugRed(obj, section);
+
+/**
+ * debugError
+ * @param obj
+ * @param section
+ */
+module.exports.debugError = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, this.colorFunctionList.error, isAnnounce);
};
/**
@@ -73,15 +96,9 @@ module.exports.debugError = function (obj, section) {
* @param obj
* @param section
*/
-module.exports.debugBlue = function (obj, section) {
- if (appConfig.showDebugLog) {
- console.log(chalk.blue('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
- if (typeof obj === 'string') {
- console.log(chalk.blue(obj));
- } else {
- console.log(obj);
- }
- }
+module.exports.debugBlue = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, this.colorFunctionList.blue, isAnnounce);
+
};
/**
@@ -89,14 +106,7 @@ module.exports.debugBlue = function (obj, section) {
* @param obj
* @param section
*/
-module.exports.debugYellow = function (obj, section) {
- if (appConfig.showDebugLog) {
- console.log(chalk.yellow('[' + moment().format('YYYY-MM-DD HH:mm:ss') + ']' + (section ? ' - ' + section : '')));
- if (typeof obj === 'string') {
- console.log(chalk.yellow(obj));
- } else {
- console.log(obj);
- }
- }
+module.exports.debugYellow = function (obj, section = undefined, isAnnounce = false) {
+ this.info(obj, section, this.colorFunctionList.yellow, isAnnounce);
};
diff --git a/config/lib/ircAnnounce.js b/config/lib/ircAnnounce.js
index 32838ef7..776f2c7b 100644
--- a/config/lib/ircAnnounce.js
+++ b/config/lib/ircAnnounce.js
@@ -25,7 +25,7 @@ module.exports = function (app) {
});
client.addListener('error', function (message) {
- console.log('IRC error: ', message);
+ console.log(chalk.red('IRC error: ' + message));
});
client.addListener('registered', function (message) {
diff --git a/config/lib/logger.js b/config/lib/logger.js
index a388a520..d70beebc 100644
--- a/config/lib/logger.js
+++ b/config/lib/logger.js
@@ -3,6 +3,7 @@
var _ = require('lodash'),
config = require('../config'),
chalk = require('chalk'),
+ loggerAnnounce = require('./loggerAnnounce'),
fs = require('fs'),
winston = require('winston');
@@ -30,7 +31,11 @@ var logger = new winston.Logger({
// option to log all HTTP requests to a file
logger.stream = {
write: function (msg) {
- logger.info(msg);
+ if (msg.indexOf('GET /announce') >= 0) {
+ loggerAnnounce.info(msg);
+ } else {
+ logger.info(msg);
+ }
}
};
@@ -81,8 +86,12 @@ logger.getLogOptions = function getLogOptions() {
return false;
}
- var logPath = configFileLogger.directoryPath + '/' + configFileLogger.fileName;
+ var logDir = configFileLogger.directoryPath + '/logs/';
+ var logPath = logDir + configFileLogger.fileName;
+ if (!fs.existsSync(logDir)) {
+ fs.mkdirSync(logDir);
+ }
return {
level: 'debug',
colorize: false,
@@ -97,7 +106,6 @@ logger.getLogOptions = function getLogOptions() {
handleExceptions: true,
humanReadableUnhandledException: true
};
-
};
/**
diff --git a/config/lib/loggerAnnounce.js b/config/lib/loggerAnnounce.js
new file mode 100644
index 00000000..c86a14bb
--- /dev/null
+++ b/config/lib/loggerAnnounce.js
@@ -0,0 +1,144 @@
+'use strict';
+
+var _ = require('lodash'),
+ config = require('../config'),
+ chalk = require('chalk'),
+ fs = require('fs'),
+ winston = require('winston');
+
+// list of valid formats for the logging
+var validFormats = ['combined', 'common', 'dev', 'short', 'tiny'];
+
+// Instantiating the default winston application logger with the Console
+// transport
+var loggerAnnounce = new winston.Logger({
+ transports: [
+ new winston.transports.Console({
+ level: 'info',
+ colorize: true,
+ showLevel: true,
+ handleExceptions: true,
+ humanReadableUnhandledException: true
+ })
+ ],
+ exitOnError: false
+});
+
+// A stream object with a write function that will call the built-in winston
+// logger.info() function.
+// Useful for integrating with stream-related mechanism like Morgan's stream
+// option to log all HTTP requests to a file
+loggerAnnounce.stream = {
+ write: function (msg) {
+ loggerAnnounce.info(msg);
+ }
+};
+
+/**
+ * Instantiate a winston's File transport for disk file logging
+ *
+ */
+loggerAnnounce.setupFileLogger = function setupFileLogger() {
+
+ var fileLoggerTransport = this.getLogOptions();
+ if (!fileLoggerTransport) {
+ return false;
+ }
+
+ try {
+ // Check first if the configured path is writable and only then
+ // instantiate the file logging transport
+ if (fs.openSync(fileLoggerTransport.filename, 'a+')) {
+ loggerAnnounce.add(winston.transports.File, fileLoggerTransport);
+ }
+
+ return true;
+ } catch (err) {
+ if (process.env.NODE_ENV !== 'test') {
+ console.log();
+ console.log(chalk.red('An error has occured during the creation of the File transport logger.'));
+ console.log(chalk.red(err));
+ console.log();
+ }
+
+ return false;
+ }
+
+};
+
+/**
+ * The options to use with winston logger
+ *
+ * Returns a Winston object for logging with the File transport
+ */
+loggerAnnounce.getLogOptions = function getLogOptions() {
+
+ var _config = _.clone(config, true);
+ var configFileLogger = _config.logAnnounce.fileLogger;
+
+ if (!_.has(_config, 'logAnnounce.fileLogger.directoryPath') || !_.has(_config, 'logAnnounce.fileLogger.fileName')) {
+ console.log('unable to find logging file configuration');
+ return false;
+ }
+
+ var logDir = configFileLogger.directoryPath + '/logs/';
+ var logPath = logDir + configFileLogger.fileName;
+
+ if (!fs.existsSync(logDir)) {
+ fs.mkdirSync(logDir);
+ }
+ return {
+ level: 'debug',
+ colorize: false,
+ filename: logPath,
+ timestamp: true,
+ maxsize: configFileLogger.maxsize ? configFileLogger.maxsize : 10485760,
+ maxFiles: configFileLogger.maxFiles ? configFileLogger.maxFiles : 2,
+ json: (_.has(configFileLogger, 'json')) ? configFileLogger.json : false,
+ eol: '\n',
+ tailable: true,
+ showLevel: true,
+ handleExceptions: true,
+ humanReadableUnhandledException: true
+ };
+};
+
+/**
+ * The options to use with morgan logger
+ *
+ * Returns a logAnnounce.options object with a writable stream based on winston
+ * file logging transport (if available)
+ */
+loggerAnnounce.getMorganOptions = function getMorganOptions() {
+
+ return {
+ stream: loggerAnnounce.stream
+ };
+
+};
+
+/**
+ * The format to use with the logger
+ *
+ * Returns the logAnnounce.format option set in the current environment configuration
+ */
+loggerAnnounce.getLogFormat = function getLogFormat() {
+ var format = config.logAnnounce && config.logAnnounce.format ? config.logAnnounce.format.toString() : 'combined';
+
+ // make sure we have a valid format
+ if (!_.includes(validFormats, format)) {
+ format = 'combined';
+
+ if (process.env.NODE_ENV !== 'test') {
+ console.log();
+ console.log(chalk.yellow('Warning: An invalid format was provided. The logger will use the default format of "' + format + '"'));
+ console.log();
+ }
+ }
+
+ return format;
+};
+
+loggerAnnounce.setupFileLogger();
+
+module.exports = loggerAnnounce;
diff --git a/config/lib/socket.io.js b/config/lib/socket.io.js
index d4c28b87..345c7ba1 100644
--- a/config/lib/socket.io.js
+++ b/config/lib/socket.io.js
@@ -6,6 +6,7 @@ var config = require('../config'),
fs = require('fs'),
http = require('http'),
https = require('https'),
+ chalk = require('chalk'),
cookieParser = require('cookie-parser'),
passport = require('passport'),
socketio = require('socket.io'),
@@ -25,7 +26,7 @@ module.exports = function (app, db) {
try {
caBundle = fs.readFileSync(path.resolve(config.secure.caBundle), 'utf8');
} catch (err) {
- console.log('Warning: couldn\'t find or read caBundle file');
+ console.log(chalk.red('Warning: couldn\'t find or read caBundle file'));
}
var options = {
diff --git a/modules/announce/server/controllers/announces.server.controller.js b/modules/announce/server/controllers/announces.server.controller.js
index f1fa0df5..68e26976 100644
--- a/modules/announce/server/controllers/announces.server.controller.js
+++ b/modules/announce/server/controllers/announces.server.controller.js
@@ -148,8 +148,8 @@ exports.announce = function (req, res) {
req.selfpeer = [];
req.seeder = false;
- mtDebug.debugGreen('------------ Announce request ----------------', 'ANNOUNCE_REQUEST');
- //mtDebug.debugGreen(req.url);
+ mtDebug.debugGreen('------------ Announce request ----------------', 'ANNOUNCE_REQUEST', true);
+ // mtDebug.debugGreen(req.url, 'ANNOUNCE_REQUEST', true);
var s = req.url.split('?');
var query = common.querystringParse(s[1]);
@@ -390,7 +390,7 @@ exports.announce = function (req, res) {
_id: {$nin: req.torrent._peers}
}, function (err, removed) {
if (removed.n > 0) {
- mtDebug.debugRed('Removed ' + removed + ' peers not in torrent._peers: ' + req.torrent._id, 'ANNOUNCE_REQUEST');
+ mtDebug.debugRed('Removed ' + removed + ' peers not in torrent._peers: ' + req.torrent._id, 'ANNOUNCE_REQUEST', true);
}
done(null);
});
@@ -478,17 +478,17 @@ exports.announce = function (req, res) {
---------------------------------------------------------------*/
function (done) {
if (event(query.event) === EVENT_STARTED) {
- mtDebug.debugGreen('---------------EVENT_STARTED----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------EVENT_STARTED----------------', 'ANNOUNCE_REQUEST', true);
var lcount = getSelfLeecherCount();
var scount = getSelfSeederCount();
if (lcount > announceConfig.announceCheck.maxLeechNumberPerUserPerTorrent && !req.seeder) {
- mtDebug.debugYellow('getSelfLeecherCount = ' + lcount, 'ANNOUNCE_REQUEST');
+ mtDebug.debugYellow('getSelfLeecherCount = ' + lcount, 'ANNOUNCE_REQUEST', true);
removeCurrPeer();
done(180);
} else if (scount > announceConfig.announceCheck.maxSeedNumberPerUserPerTorrent && req.seeder) {
- mtDebug.debugYellow('getSelfSeederCount = ' + scount, 'ANNOUNCE_REQUEST');
+ mtDebug.debugYellow('getSelfSeederCount = ' + scount, 'ANNOUNCE_REQUEST', true);
removeCurrPeer();
done(181);
} else {
@@ -507,7 +507,7 @@ exports.announce = function (req, res) {
write time of seed(complete) whether or not u/d is 0
---------------------------------------------------------------*/
function (done) {
- mtDebug.debugGreen('---------------WRITE_UP_DOWN_DATA----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------WRITE_UP_DOWN_DATA----------------', 'ANNOUNCE_REQUEST', true);
var curru = 0;
var currd = 0;
@@ -765,7 +765,7 @@ exports.announce = function (req, res) {
---------------------------------------------------------------*/
function (done) {
if (event(query.event) === EVENT_COMPLETED) {
- mtDebug.debugGreen('---------------EVENT_COMPLETED----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------EVENT_COMPLETED----------------', 'ANNOUNCE_REQUEST', true);
//write completed torrent data into finished
var finished = new Finished();
finished.user = req.passkeyuser;
@@ -810,7 +810,7 @@ exports.announce = function (req, res) {
---------------------------------------------------------------*/
function (done) {
if (event(query.event) === EVENT_STOPPED) {
- mtDebug.debugGreen('---------------EVENT_STOPPED----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------EVENT_STOPPED----------------', 'ANNOUNCE_REQUEST', true);
if (req.completeTorrent) {
req.completeTorrent.countHnRWarning(true, false);
@@ -831,7 +831,7 @@ exports.announce = function (req, res) {
req.passkeyuser.updateSeedLeechNumbers();
if (slCount) {
- mtDebug.debugYellow(slCount, 'ANNOUNCE_REQUEST');
+ mtDebug.debugYellow(slCount, 'ANNOUNCE_REQUEST', true);
req.torrent.torrent_seeds = slCount.seedCount;
req.torrent.torrent_leechers = slCount.leechCount;
}
@@ -853,7 +853,7 @@ exports.announce = function (req, res) {
peerBuffer = peerBuffer.slice(0, len);
var resp = 'd8:intervali' + ANNOUNCE_INTERVAL + 'e8:completei' + req.torrent.torrent_seeds + 'e10:incompletei' + req.torrent.torrent_leechers + 'e10:downloadedi' + req.torrent.torrent_finished + 'e5:peers' + len + ':';
- mtDebug.debugGreen(resp, 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen(resp, 'ANNOUNCE_REQUEST', true);
res.writeHead(200, {
'Content-Length': resp.length + peerBuffer.length + 1,
@@ -861,7 +861,7 @@ exports.announce = function (req, res) {
});
if (len > 0) {
- mtDebug.debug(peerBuffer, 'ANNOUNCE_REQUEST');
+ mtDebug.debug(peerBuffer, 'ANNOUNCE_REQUEST', true);
}
res.write(resp);
res.write(peerBuffer);
@@ -886,7 +886,7 @@ exports.announce = function (req, res) {
req.currentPeer.isNewCreated = false;
if (req.seeder && req.currentPeer.peer_status !== PEERSTATE_SEEDER && event(query.event) !== EVENT_COMPLETED) {
- mtDebug.debugGreen('---------------PEER STATUS CHANGED: Seeder----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------PEER STATUS CHANGED: Seeder----------------', 'ANNOUNCE_REQUEST', true);
doCompleteEvent(function () {
if (callback) callback();
});
@@ -962,7 +962,7 @@ exports.announce = function (req, res) {
peer.save(function (err) {
if (!err) {
req.currentPeer = peer;
- mtDebug.debugGreen('---------------createCurrentPeer()----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------createCurrentPeer()----------------', 'ANNOUNCE_REQUEST', true);
if (callback) callback();
}
});
@@ -980,7 +980,7 @@ exports.announce = function (req, res) {
req.currentPeer.remove(function () {
if (callback) callback();
- mtDebug.debugGreen('---------------removeCurrPeer()----------------', 'ANNOUNCE_REQUEST');
+ mtDebug.debugGreen('---------------removeCurrPeer()----------------', 'ANNOUNCE_REQUEST', true);
});
}
@@ -1107,7 +1107,7 @@ exports.announce = function (req, res) {
*/
function sendError(failure) {
var respc = failure.bencode();
- mtDebug.debugRed(respc, 'ANNOUNCE_REQUEST');
+ mtDebug.debugRed(respc, 'ANNOUNCE_REQUEST', true);
res.writeHead(200, {
'Content-Length': respc.length,
'Content-Type': 'text/plain'
@@ -1143,14 +1143,14 @@ exports.announce = function (req, res) {
if (p.last_announce_at > (Date.now() - announceConfig.announceInterval - 60 * 1000)) { //do not send ghost peer
if (p.user.equals(req.passkeyuser._id)) {
if (announceConfig.peersCheck.peersSendListIncludeOwnSeed) {
- mtDebug.info(p._id);
+ mtDebug.info(p._id, 'ANNOUNCE_REQUEST', true);
bc = compact(p);
if (bc) {
bc.copy(buf, c++ * PEER_COMPACT_SIZE);
}
}
} else {
- mtDebug.info(p._id);
+ mtDebug.info(p._id, 'ANNOUNCE_REQUEST', true);
bc = compact(p);
if (bc) {
bc.copy(buf, c++ * PEER_COMPACT_SIZE);
diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js
index 537194ed..f616fa3a 100644
--- a/modules/core/client/controllers/home.client.controller.js
+++ b/modules/core/client/controllers/home.client.controller.js
@@ -55,7 +55,6 @@
vm.getForumList = function () {
ForumsService.get({}, function (items) {
vm.forums = items.forumsList;
- console.log(items);
});
};
diff --git a/modules/core/client/directives/torrent-progress.client.directive.js b/modules/core/client/directives/torrent-progress.client.directive.js
index 031c42db..b542558e 100644
--- a/modules/core/client/directives/torrent-progress.client.directive.js
+++ b/modules/core/client/directives/torrent-progress.client.directive.js
@@ -42,7 +42,6 @@
//t_progressbar.progressbarEl.css('right', '8px');
//element.css('margin-bottom', '8px');
- //console.log(t_progressbar);
}
});
}
@@ -90,7 +89,6 @@
//t_progressbar.progressbarEl.css('right', '8px');
//element.css('margin-bottom', '8px');
- //console.log(t_progressbar);
}
});
}
diff --git a/modules/forums/server/controllers/forums.server.controller.js b/modules/forums/server/controllers/forums.server.controller.js
index 0a6b890e..60254ba4 100644
--- a/modules/forums/server/controllers/forums.server.controller.js
+++ b/modules/forums/server/controllers/forums.server.controller.js
@@ -398,7 +398,7 @@ exports.globalTopics = function (req, res) {
}
});
- mtDebug.debugBlue(ids);
+ mtDebug.debugBlue(ids, 'FORUMS_ID_LIST');
Topic.find({
isGlobal: true,
diff --git a/modules/messages/client/controllers/messages.client.controller.js b/modules/messages/client/controllers/messages.client.controller.js
index 6e176f19..3648e765 100644
--- a/modules/messages/client/controllers/messages.client.controller.js
+++ b/modules/messages/client/controllers/messages.client.controller.js
@@ -292,7 +292,6 @@
* @param cnt
*/
vm.contentToJSON = function (cnt) {
- console.log(cnt);
if (cnt.type === 'server' && (typeof cnt.content) === 'string') {
cnt.content = JSON.parse(cnt.content);
diff --git a/modules/requests/client/controllers/requests-view.client.controller.js b/modules/requests/client/controllers/requests-view.client.controller.js
index f00f948b..0c8ebc02 100644
--- a/modules/requests/client/controllers/requests-view.client.controller.js
+++ b/modules/requests/client/controllers/requests-view.client.controller.js
@@ -162,7 +162,6 @@
*/
vm.scrollToElement = function (id) {
var element = angular.element(id);
- console.log(element);
$timeout(function () {
$('html,body').animate({scrollTop: element[0].offsetTop - 60}, 300, function () {
diff --git a/modules/systems/client/controllers/examinaiton.client.controller.js b/modules/systems/client/controllers/examinaiton.client.controller.js
index 58a07dfa..a862b635 100644
--- a/modules/systems/client/controllers/examinaiton.client.controller.js
+++ b/modules/systems/client/controllers/examinaiton.client.controller.js
@@ -31,7 +31,6 @@
ModalConfirmService.showModal({}, modalOptions)
.then(function (result) {
SystemsService.initExaminationData(function (res) {
- console.log(res);
NotifycationService.showSuccessNotify('SYSTEMS.INIT_EXAMINATION_SUCCESSFULLY');
}, function (err) {
NotifycationService.showErrorNotify(err.data.message, 'SYSTEMS.INIT_EXAMINATION_ERRORU');
diff --git a/modules/systems/client/controllers/systems-config.client.controller.js b/modules/systems/client/controllers/systems-config.client.controller.js
index 40f06f6c..162f3da7 100644
--- a/modules/systems/client/controllers/systems-config.client.controller.js
+++ b/modules/systems/client/controllers/systems-config.client.controller.js
@@ -312,7 +312,6 @@
}
function showCommandStdout(res) {
- console.log(res);
vm.shellIsRunning = false;
var stdoutElement = $('#stdout-message');
diff --git a/modules/users/client/controllers/follow/following.client.controller.js b/modules/users/client/controllers/follow/following.client.controller.js
index 4bde46fd..9a3b4b54 100644
--- a/modules/users/client/controllers/follow/following.client.controller.js
+++ b/modules/users/client/controllers/follow/following.client.controller.js
@@ -95,7 +95,6 @@
}
function onError(response) {
- console.log(response);
NotifycationService.showErrorNotify(response.data.message, 'UNFOLLOW_ERROR');
}
};
diff --git a/modules/users/client/directives/up-down.client.directive.js b/modules/users/client/directives/up-down.client.directive.js
index c0024329..1cc6ef3a 100644
--- a/modules/users/client/directives/up-down.client.directive.js
+++ b/modules/users/client/directives/up-down.client.directive.js
@@ -22,7 +22,6 @@
var titled = $translate.instant('USER_DOWNLOADED_FLAG', {name: user.displayName});
var cls = attrs.upDownClass;
- console.log(user);
var eu = angular.element('' + $filter('bytes')(user.uploaded) + '');
var ed = angular.element('' + $filter('bytes')(user.downloaded) + '');
diff --git a/modules/users/server/controllers/admin.server.controller.js b/modules/users/server/controllers/admin.server.controller.js
index 8190a066..eb51c384 100644
--- a/modules/users/server/controllers/admin.server.controller.js
+++ b/modules/users/server/controllers/admin.server.controller.js
@@ -369,8 +369,8 @@ exports.addVIPMonths = function (req, res) {
var months = parseInt(req.params.months, 10);
if (months > 0) {
- mtDebug.debugBlue(user.vip_start_at);
- mtDebug.debugBlue(user.vip_end_at);
+ mtDebug.debugBlue(user.vip_start_at, 'VIP_START_AT');
+ mtDebug.debugBlue(user.vip_end_at, 'VIP_END_AT');
var now = moment(Date.now());
var start = moment(user.vip_start_at);
@@ -386,8 +386,8 @@ exports.addVIPMonths = function (req, res) {
end = moment(end).add(months, 'M');
}
- mtDebug.debugBlue(start);
- mtDebug.debugBlue(end);
+ mtDebug.debugBlue(start, 'VIP_NEW_START_AT');
+ mtDebug.debugBlue(end, 'VIP_NEW_END_AT');
user.vip_start_at = start;
user.vip_end_at = end;