From 0b614022adf1e00a234cb4e2ec721c720a29d941 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Fri, 4 Nov 2016 07:11:22 +0200 Subject: [PATCH] Final logger format maybe --- v2/dist/js/main.js | 12 +++++++++--- v2/src/js/utils.js | 12 ++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/v2/dist/js/main.js b/v2/dist/js/main.js index 75aff89..76385f2 100644 --- a/v2/dist/js/main.js +++ b/v2/dist/js/main.js @@ -63,19 +63,25 @@ { key: 'log', value: function log(msg) { - console.log('%c[BD] %cINF >> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:green; font-weight:700', ''); + console.log('%c[BD] %c>> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:#000; font-weight:700', ''); + } + }, + { + key: 'info', + value: function info(msg) { + console.info('%c[BD] %c>> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:blue; font-weight:700', ''); } }, { key: 'warn', value: function warn(msg) { - console.log('%c[BD] %cWRN >> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:orange; font-weight:700', ''); + console.warn('%c[BD] %c>> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:orange; font-weight:700', ''); } }, { key: 'err', value: function err(msg) { - console.log('%c[BD] %cERR >> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:red; font-weight:700', ''); + console.error('%c[BD] %c>> %c' + msg, 'color:#3e82e5; font-weight:700', 'color:red; font-weight:700', ''); } }, { diff --git a/v2/src/js/utils.js b/v2/src/js/utils.js index fa25314..1109571 100644 --- a/v2/src/js/utils.js +++ b/v2/src/js/utils.js @@ -1,7 +1,7 @@ /* BetterDiscordApp Client Utilities * Version: 2:1.0 * Author: Jiiks | https://jiiks.net - * Date: 31/10/2016 + * Date: 04/11/2016 * Last Update: 31/10/2016 * Github: https://github.com/Jiiks/BetterDiscordApp * Git: https://github.com/Jiiks/BetterDiscordApp.git @@ -18,15 +18,19 @@ define(() => { } log(msg) { - console.log(`%c[BD] %cINF >> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:green; font-weight:700', '') + console.log(`%c[BD] %c>> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:#000; font-weight:700', '') + } + + info(msg) { + console.info(`%c[BD] %c>> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:blue; font-weight:700', '') } warn(msg) { - console.log(`%c[BD] %cWRN >> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:orange; font-weight:700', '') + console.warn(`%c[BD] %c>> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:orange; font-weight:700', '') } err(msg) { - console.log(`%c[BD] %cERR >> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:red; font-weight:700', '') + console.error(`%c[BD] %c>> %c${msg}`, 'color:#3e82e5; font-weight:700', 'color:red; font-weight:700', '') } get dateString() {