Two teams try and fill in any horizontal, vertical, or diagonal line on a bingo board by playing maps on osu!
osu.bingo
osu
1import { Logtail } from '@logtail/node';
2import winston, { config } from 'winston';
3import { env } from '$env/dynamic/private';
4import { LogtailTransport } from '@logtail/winston';
5
6export const logger = winston.createLogger({
7 format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
8 defaultMeta: { host: process.env.HOST },
9 handleExceptions: true,
10 levels: config.npm.levels,
11
12 transports: [
13 new winston.transports.Console({
14 level: 'http',
15 format: winston.format.combine(
16 winston.format.align(),
17 winston.format.cli({
18 levels: config.npm.levels,
19 colors: {
20 error: 'bold red',
21 warn: 'bold yellow',
22 info: 'bold blue',
23 http: 'bold green',
24 debug: 'bold gray',
25 silly: 'bold pink'
26 },
27 })
28 )
29 })
30 ]
31});
32
33if (env.LOG_TOKEN) {
34 const logtail = new Logtail(env.LOG_TOKEN);
35 logger.add(new LogtailTransport(logtail));
36} else {
37 logger.warn('Missing logtail token, running without uploading logs...');
38}
39
40if (process.env.NODE_ENV !== 'production') {
41 logger.add(new winston.transports.File({
42 filename: 'app.log',
43 level: 'debug'
44 }));
45}