aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/logger.js
diff options
context:
space:
mode:
authorMarvin Borner2018-10-25 19:00:34 +0200
committerMarvin Borner2018-10-25 19:00:34 +0200
commit185e0f26c6680c64cb5f2befdedd0cc3bbf09df5 (patch)
tree40e293a98eabb951863cfce7807e1268616963da /src/logger.js
Added file structure for featherjs
Diffstat (limited to 'src/logger.js')
-rw-r--r--src/logger.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/logger.js b/src/logger.js
new file mode 100644
index 0000000..b9aba0d
--- /dev/null
+++ b/src/logger.js
@@ -0,0 +1,16 @@
+const { createLogger, format, transports } = require('winston');
+
+// Configure the Winston logger. For the complete documentation see https://github.com/winstonjs/winston
+const logger = createLogger({
+ // To see more detailed errors, change this to 'debug'
+ level: 'info',
+ format: format.combine(
+ format.splat(),
+ format.simple()
+ ),
+ transports: [
+ new transports.Console()
+ ],
+});
+
+module.exports = logger;