Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Index: src/logging/LoggerFactory.ts
  2. IDEA additional info:
  3. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  4. <+>UTF-8
  5. ===================================================================
  6. --- src/logging/LoggerFactory.ts (revision d198220cb49a5865f647d7b74ca1a078163dac81)
  7. +++ src/logging/LoggerFactory.ts (revision d198220cb49a5865f647d7b74ca1a078163dac81)
  8. @@ -0,0 +1,20 @@
  9. +import * as winston from "winston";
  10. +
  11. +export class LoggerFactory {
  12. + /**
  13. + * Creates a new Logger with specified name and standard transports
  14. + * and their configuration.
  15. + *
  16. + * @param name name of the new logger
  17. + */
  18. + static getLogger(name: string) {
  19. + return winston.createLogger({
  20. + transports: [
  21. + new winston.transports.Console({
  22. + format: winston.format.simple()
  23. + })
  24. + ]
  25. + });
  26. +
  27. + }
  28. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement