<commit_before>import { oneLine } from 'common-tags'
import { Guild } from 'discord.js'
import { Command, CommandGroup, CommandMessage, CommandoClient, FriendlyError } from 'discord.js-commando'
import * as fs from 'fs'
import * as path from 'path'
import * as winston from 'winston'

import CommunityManager from './community/community-manager'
import PostgreSQL from './database/postgresql'
import * as SequelizeProvider from './providers/sequelize-provider'

import * as config from '/data/config.json'

winston.default.level = config.logLevel
if (!fs.existsSync('/data/logs')) { fs.mkdirSync('/data/logs') }
if (!fs.existsSync('/data/sounds')) { fs.mkdirSync('/data/sounds') }
if (!fs.existsSync('/data/images')) { fs.mkdirSync('/data/images') }
if (!fs.existsSync('/data/images/art')) { fs.mkdirSync('/data/images/art') }
if (!fs.existsSync('/data/images/gold')) { fs.mkdirSync('/data/images/gold') }

const client: CommandoClient = new CommandoClient({
    commandPrefix: config.prefix,
    owner: config.owner
})

PostgreSQL.start()
client.setProvider(new SequelizeProvider(PostgreSQL.db)).catch(winston.error)

client.on('debug', winston.debug)<commit_msg>Specify winston config<commit_after>import { oneLine } from 'common-tags'
import { Guild } from 'discord.js'
import { Command, CommandGroup, CommandMessage, CommandoClient, FriendlyError } from 'discord.js-commando'
import * as fs from 'fs'
import * as moment from 'moment'
import * as path from 'path'
import * as winston from 'winston'

import CommunityManager from './community/community-manager'
import PostgreSQL from './database/postgresql'
import * as SequelizeProvider from './providers/sequelize-provider'

import * as config from '/data/config.json'

if (!fs.existsSync('/data/logs')) { fs.mkdirSync('/data/logs') }
if (!fs.existsSync('/data/sounds')) { fs.mkdirSync('/data/sounds') }
if (!fs.existsSync('/data/images')) { fs.mkdirSync('/data/images') }
if (!fs.existsSync('/data/images/art')) { fs.mkdirSync('/data/images/art') }
if (!fs.existsSync('/data/images/gold')) { fs.mkdirSync('/data/images/gold') }

winston.configure({
    transports: [
        new (winston.transports.Console)({
            level: config.logLevel,
            prettyPrint: true,
            timestamp: () => moment().format('YYYY-MM-DD HH:mm:ss.SSS')
        }),
        new (winston.transports.File)({
            filename: '/data/logs/debug.log',
            json: false,
            level: 'debug',
            maxFiles: 5,
            maxSize: 1000000,
            prettyPrint: true,
            tailable: true,
            timestamp: () => moment().format('YYYY-MM-DD HH:mm:ss.SSS')
        })
    ]
})

const client: CommandoClient = new CommandoClient({
    commandPrefix: config.prefix,
    owner: config.owner
})

PostgreSQL.start()
client.setProvider(new SequelizeProvider(PostgreSQL.db)).catch(winston.error)

client.on('debug', winston.debug)
{'fraction_non_alphanumeric': 0.15990371389270977, 'fraction_numerical': 0.002751031636863824, 'mean_word_length': 3.889075630252101, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5149623', 'n_tokens_mistral': 934, 'n_tokens_neox': 898, 'n_words': 194}