Use Logger

This commit is contained in:
Samuel Elliott 2018-03-30 01:05:10 +01:00
parent d323292162
commit 8983256ade
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
2 changed files with 7 additions and 6 deletions

View File

@ -9,11 +9,12 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
import { EmoteModule } from 'builtin';
import { Reflection } from 'ui';
import { ClientLogger as Logger } from 'common';
import { MonkeyPatch, Patcher } from './patcher'; import { MonkeyPatch, Patcher } from './patcher';
import { WebpackModules, Filters } from './webpackmodules'; import { WebpackModules, Filters } from './webpackmodules';
import DiscordApi from './discordapi'; import DiscordApi from './discordapi';
import { EmoteModule } from 'builtin';
import { Reflection } from 'ui';
class Helpers { class Helpers {
static get plannedActions() { static get plannedActions() {
@ -209,7 +210,7 @@ export class ReactComponents {
if (important) { if (important) {
const importantInterval = setInterval(() => { const importantInterval = setInterval(() => {
if (this.components.find(c => c.id === name)) { if (this.components.find(c => c.id === name)) {
console.info(`Important component ${name} already found`); Logger.info('ReactComponents', `Important component ${name} already found`);
clearInterval(importantInterval); clearInterval(importantInterval);
return; return;
} }
@ -218,11 +219,11 @@ export class ReactComponents {
const reflect = Reflection(select); const reflect = Reflection(select);
if (!reflect.component) { if (!reflect.component) {
clearInterval(importantInterval); clearInterval(importantInterval);
console.error(`FAILED TO GET IMPORTANT COMPONENT ${name} WITH REFLECTION FROM`, select); Logger.error('ReactComponents', [`FAILED TO GET IMPORTANT COMPONENT ${name} WITH REFLECTION FROM`, select]);
return; return;
} }
if (!reflect.component.displayName) reflect.component.displayName = name; if (!reflect.component.displayName) reflect.component.displayName = name;
console.info(`Found important component ${name} with reflection.`); Logger.info('ReactComponents', `Found important component ${name} with reflection`);
this.push(reflect.component); this.push(reflect.component);
clearInterval(importantInterval); clearInterval(importantInterval);
}, 50); }, 50);

View File

@ -47,7 +47,7 @@ export default class extends EventListener {
this.setIds(); this.setIds();
this.makeMutable(); this.makeMutable();
} catch (err) { } catch (err) {
console.log(err); Logger.err('AutoManip', err);
} }
} }