<commit_before>import { injectable, inject, multiInject, KernelModule } from "inversify";
import * as chalk from 'chalk';
import { EventEmitter } from 'events';
// import {Homenet} from './interfaces.d.ts';

// import LightsManager = require('./lights/lights-manager');
import { App } from './core/app';
import { Common } from './core/common';
import ClassesManager = require('./core/classes-manager');
import { CommandManager } from './core/command-manager';
import SwitchManager = require('./core/switch-manager');
import SharedEventEmitter = require('./core/shared-event-emitter');

import { NodeRed } from './core/node-red';
import { GlobalContext } from './core/global-context';
import { SceneManager } from './core/scene-manager';
import { InstanceLoader } from './core/instance-loader';
import { Authorizer } from './core/authorizer';

// low level
import { TriggerManager } from './core/trigger-manager';
import { ValuesManager } from './core/values-manager';
import { StateManager } from './core/state-manager';
import { PresenceManager } from './core/presence-manager';
import { StorageManager } from './core/redis-storage-manager';

// core functions
import { Sunlight } from './core/sunlight';
import { ZoneManager } from './core/zone-manager';

// higher level
import { SensorManager } from './classes/sensor-manager';
import { LightsManager } from './classes/lights-manager';
import { LockManager } from './classes/lock-manager';
import { PersonManager } from './classes/person-manager';
import { RedisPersistence } from './core/redis-persistence';

import Core = require('./core/index');

// @injectable()
// class ConfigImpl implements Homenet.IConfig {
//   hue: any = {};
//   instances: Homenet.InstanceConfig[] = [];
//   zones: Homenet.IZoneConfig[] = [];
//   locks: Homenet.ILockConfig[] = [];
//   people: Homenet.IPersonConfig[] = [];
//   dataPath: string = '';
//   webServerPort: number = 1234;
//   location: Homenet.IConfigCoords = null
// }

// const config: Homenet.IConfig = require('./test-config');

@injectable()
class ConsoleLogger implements Homenet.ILogTarget {
  constructor() {}

  info(args : any) : void {
    console.log(chalk.green('INFO'), args);
  }
  warn(args : any) : void {
    console.warn(chalk.yellow('WARN'), args);
  }
  error(args : any) : void {
    console.error(chalk.red('ERRO'), args);
  }
  debug(args : any) : void {
    console.log(chalk.blue('DEBG'), args);
  }
}

@injectable()
class CoreLogger implements Homenet.ILogger {<commit_msg>remove comments<commit_after>import { injectable, inject, multiInject, KernelModule } from "inversify";
import * as chalk from 'chalk';
import { EventEmitter } from 'events';

import { App } from './core/app';
import { Common } from './core/common';
import ClassesManager = require('./core/classes-manager');
import { CommandManager } from './core/command-manager';
import SwitchManager = require('./core/switch-manager');
import SharedEventEmitter = require('./core/shared-event-emitter');

import { NodeRed } from './core/node-red';
import { GlobalContext } from './core/global-context';
import { SceneManager } from './core/scene-manager';
import { InstanceLoader } from './core/instance-loader';
import { Authorizer } from './core/authorizer';

// low level
import { TriggerManager } from './core/trigger-manager';
import { ValuesManager } from './core/values-manager';
import { StateManager } from './core/state-manager';
import { PresenceManager } from './core/presence-manager';
import { StorageManager } from './core/redis-storage-manager';

// core functions
import { Sunlight } from './core/sunlight';
import { ZoneManager } from './core/zone-manager';

// higher level
import { SensorManager } from './classes/sensor-manager';
import { LightsManager } from './classes/lights-manager';
import { LockManager } from './classes/lock-manager';
import { PersonManager } from './classes/person-manager';
import { RedisPersistence } from './core/redis-persistence';

import Core = require('./core/index');

@injectable()
class ConsoleLogger implements Homenet.ILogTarget {
  constructor() {}

  info(args : any) : void {
    console.log(chalk.green('INFO'), args);
  }
  warn(args : any) : void {
    console.warn(chalk.yellow('WARN'), args);
  }
  error(args : any) : void {
    console.error(chalk.red('ERRO'), args);
  }
  debug(args : any) : void {
    console.log(chalk.blue('DEBG'), args);
  }
}

@injectable()
class CoreLogger implements Homenet.ILogger {
{'fraction_non_alphanumeric': 0.16924110141034251, 'fraction_numerical': 0.0008954555630176853, 'mean_word_length': 4.147465437788019, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5072009', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1316, 'n_words': 325}