<commit_before>// LICENSE : MIT
"use strict";
import AlminLogger from "./AlminLogger";
const EventEmitter = require("events");
// performance.now polyfill
import now from "./performance-now";
export default class SyncLogger extends EventEmitter {
    constructor({console, templates}) {
        super();
        this._logMap = {};
        this._releaseHandlers = [];
        this.logger = console;
        this.templates = templates;
    }

    /**
     * flush current log buffer
     */
    flushBuffer() {
        this._logBuffer.length = 0;
    }

    /**
     * start logging for {@link context}
     * @param {Context} context
     */
    startLogging(context) {
        const onWillExecuteEachUseCase = useCase => {
            const startTimeStamp = now();
            this.logger.groupCollapsed(useCase.name, startTimeStamp);
            this._logMap[useCase.name] = startTimeStamp;
            this.logger.log(`${useCase.name} will execute`);
        };
        const onDispatch = payload => {
            this.logger.info(`Dispatch:${payload.type}`, payload)
        };
        const onChange = (stores) => {
            stores.forEach(state => {
                this.logger.groupCollapsed(`Store:${state.name} is Changed`);
                this.logger.info(state.getState());
                this.logger.groupEnd();
            });
        };
        const onDidExecuteEachUseCase = (useCase) => {
            const startTimeStamp = this._logMap[useCase.name];
            const takenTime = now() - startTimeStamp;<commit_msg>chore(sync): add emoji prefix logger<commit_after>// LICENSE : MIT
"use strict";
import AlminLogger from "./AlminLogger";
const EventEmitter = require("events");
// performance.now polyfill
import now from "./performance-now";
export default class SyncLogger extends EventEmitter {
    constructor({console, templates}) {
        super();
        this._logMap = {};
        this._releaseHandlers = [];
        this.logger = console;
        this.templates = templates;
    }

    /**
     * flush current log buffer
     */
    flushBuffer() {
        this._logBuffer.length = 0;
    }

    /**
     * start logging for {@link context}
     * @param {Context} context
     */
    startLogging(context) {
        const onWillExecuteEachUseCase = useCase => {
            const startTimeStamp = now();
            this.logger.groupCollapsed(`\u{1F516} ${useCase.name}`, startTimeStamp);
            this._logMap[useCase.name] = startTimeStamp;
            this.logger.log(`${useCase.name} will execute`);
        };
        const onDispatch = payload => {
            this.logger.info(`\u{1F525} Dispatch:${payload.type}`, payload)
        };
        const onChange = (stores) => {
            stores.forEach(state => {
                this.logger.groupCollapsed(`\u{1F4BE} Store:${state.name} is Changed`);
                this.logger.info(state.getState());
                this.logger.groupEnd();
            });
        };
        const onDidExecuteEachUseCase = (useCase) => {
            const startTimeStamp = this._logMap[useCase.name];
            const takenTime = now() - startTimeStamp;
{'fraction_non_alphanumeric': 0.1305041480536056, 'fraction_numerical': 0.0038289725590299937, 'mean_word_length': 2.1698685540950455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5277115', 'n_tokens_mistral': 871, 'n_tokens_neox': 864, 'n_words': 178}