<commit_before>import {Observable} from 'rxjs/Observable';
import {LogPublisher} from '@shared/modules/logs/log.publisher';
import {LogEntry} from '@shared/modules/logs/log.entry';
import {LogLevel} from '@shared/modules/logs/log.level';

export class LogConsole extends LogPublisher {

    private logProvider = console.log.bind(window.console);

    log(entry: LogEntry): Observable<boolean> {
        // Log to console
        switch (entry.level)  {
            case LogLevel.ERROR:
            case LogLevel.FATAL:
                console.error.bind(console)(entry.buildLogString());
                break;
            case LogLevel.WARN:
                console.warn.bind(console)(entry.buildLogString());
                break;
            default:
                console.log.bind(console)(entry.buildLogString());
        }
        return Observable.of(true);
    }

    clear(): Observable<boolean> {
        this.logProvider.clear();
        return Observable.of(true);
    }<commit_msg>Remove unnecessary code<commit_after>import {Observable} from 'rxjs/Observable';
import {LogPublisher} from '@shared/modules/logs/log.publisher';
import {LogEntry} from '@shared/modules/logs/log.entry';
import {LogLevel} from '@shared/modules/logs/log.level';

export class LogConsole extends LogPublisher {

    log(entry: LogEntry): Observable<boolean> {
        // Log to console
        switch (entry.level)  {
            case LogLevel.ERROR:
            case LogLevel.FATAL:
                console.error.bind(console)(entry.buildLogString());
                break;
            case LogLevel.WARN:
                console.warn.bind(console)(entry.buildLogString());
                break;
            default:
                console.log.bind(console)(entry.buildLogString());
        }
        return Observable.of(true);
    }

    clear(): Observable<boolean> {
        return Observable.of(true);
    }
{'fraction_non_alphanumeric': 0.12035583464154893, 'fraction_numerical': 0.0, 'mean_word_length': 2.354385964912281, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4259212', 'n_tokens_mistral': 527, 'n_tokens_neox': 502, 'n_words': 100}