<commit_before>'use strict';

var Config = require('./core/config');

var _ = require('lodash-node');
var config = new Config();
var hasColor = require('has-color');
var path = require('path');

function resolve(s) {
    return path.join(__dirname, s);
}

config.configure({
    loggings: {
        global: {
            Class: resolve('./core/logging'),
            levels: {
                INTERNAL: -Infinity,
                DEBUG: 0,
                NOTE: 20000,
                INFO: 40000,
                LOG: 55000,
                WARNING: 65000,
                ERROR: 70000,
                FATAL: Infinity
            },
            level: 'NOTE',
            handlers: ['console'],
            records: {
                internal: {
                    level: 'INTERNAL',
                    Class: resolve('./core/record/sprintf-record')
                },
                debug: {
                    level: 'DEBUG',
                    Class: resolve('./core/record/sprintf-record')
                },
                note: {
                    level: 'NOTE',
                    Class: resolve('./core/record/sprintf-record')
                },
                info: {
                    level: 'INFO',
                    Class: resolve('./core/record/sprintf-record')
                },
                log: {
                    level: 'LOG',
                    Class: resolve('./core/record/sprintf-record')
                },
                warn: {
                    level: 'WARNING',
                    Class: resolve('./core/record/sprintf-record')
                },
                error: {
                    level: 'ERROR',
                    Class: resolve('./core/record/sprintf-record')
                },
                fatal: {
                    level: 'FATAL',
                    Class: resolve('./core/record/sprintf-record')
                }
            }
        }
    },
    handlers: {
        console: {
            Class: resolve('./core/handler/stream-handler'),
            layout: ['pretty', 'colored'][Number(hasColor)],
            params: {
                stream: process.stdout,
                streams: {
                    WARNING: process.stderr,
                    ERROR: process.stderr,
                    FATAL: process.stderr
                }
            }
        }
    },
    layouts: {
        pretty: {
            Class: resolve('./core/layout/layout'),
            params: {
                strftime: '[%d/%b/%Y:%H:%M:%S %z]',
                strf: '%(asctime)s %(process)s:%(name)s %(level)s - %(message)s\n'
            }<commit_msg>Fix pretty layout strf parameter<commit_after>'use strict';

var Config = require('./core/config');

var _ = require('lodash-node');
var config = new Config();
var hasColor = require('has-color');
var path = require('path');

function resolve(s) {
    return path.join(__dirname, s);
}

config.configure({
    loggings: {
        global: {
            Class: resolve('./core/logging'),
            levels: {
                INTERNAL: -Infinity,
                DEBUG: 0,
                NOTE: 20000,
                INFO: 40000,
                LOG: 55000,
                WARNING: 65000,
                ERROR: 70000,
                FATAL: Infinity
            },
            level: 'NOTE',
            handlers: ['console'],
            records: {
                internal: {
                    level: 'INTERNAL',
                    Class: resolve('./core/record/sprintf-record')
                },
                debug: {
                    level: 'DEBUG',
                    Class: resolve('./core/record/sprintf-record')
                },
                note: {
                    level: 'NOTE',
                    Class: resolve('./core/record/sprintf-record')
                },
                info: {
                    level: 'INFO',
                    Class: resolve('./core/record/sprintf-record')
                },
                log: {
                    level: 'LOG',
                    Class: resolve('./core/record/sprintf-record')
                },
                warn: {
                    level: 'WARNING',
                    Class: resolve('./core/record/sprintf-record')
                },
                error: {
                    level: 'ERROR',
                    Class: resolve('./core/record/sprintf-record')
                },
                fatal: {
                    level: 'FATAL',
                    Class: resolve('./core/record/sprintf-record')
                }
            }
        }
    },
    handlers: {
        console: {
            Class: resolve('./core/handler/stream-handler'),
            layout: ['pretty', 'colored'][Number(hasColor)],
            params: {
                stream: process.stdout,
                streams: {
                    WARNING: process.stderr,
                    ERROR: process.stderr,
                    FATAL: process.stderr
                }
            }
        }
    },
    layouts: {
        pretty: {
            Class: resolve('./core/layout/layout'),
            params: {
                strftime: '[%d/%b/%Y:%H:%M:%S %z]',
                strf: '%(asctime)s %(process)s %(name)s %(level)s - %(message)s\n'
            }
{'fraction_non_alphanumeric': 0.13192461450599657, 'fraction_numerical': 0.009899105273177233, 'mean_word_length': 0.9992389649923896, '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': '3886870', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1270, 'n_words': 243}