Skip to content

Instantly share code, notes, and snippets.

@fieldju
Created March 19, 2020 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fieldju/8a32f3ba7ec31e6667ac5054046ec562 to your computer and use it in GitHub Desktop.
Save fieldju/8a32f3ba7ec31e6667ac5054046ec562 to your computer and use it in GitHub Desktop.
typescript script template
import * as winston from 'winston'
const LOGGER = winston.createLogger({
transports: new winston.transports.Console({
format: winston.format.combine(
winston.format.timestamp(),
winston.format.colorize(),
winston.format.printf(msg => {
return `${msg.timestamp} - ${msg.level}: ${msg.message}`
})
),
})
});
const { debug, info, warn, error } = LOGGER;
const main = async () => {
};
main().catch(e => { error(e); process.exit(1) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment