Skip to content

Commit 9a09651

Browse files
committed
feat: remove the need of buyan logger in src/index.js
as buyan can not be consumed by webpack
1 parent 42d4a2d commit 9a09651

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bin/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env node
22

3+
const buyan = require('bunyan');
34
const yargs = require('yargs');
45
const path = require('path');
56

@@ -131,6 +132,7 @@ function startFtpServer(_state) {
131132
}
132133

133134
const ftpServer = new FtpSrv({
135+
log: buyan.createLogger({name: 'ftp-srv'}),
134136
url: _state.url,
135137
pasv_url: _state.pasv_url,
136138
pasv_min: _state.pasv_min,

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const _ = require('lodash');
22
const Promise = require('bluebird');
33
const nodeUrl = require('url');
4-
const buyan = require('bunyan');
54
const net = require('net');
65
const tls = require('tls');
76
const EventEmitter = require('events');
@@ -13,7 +12,7 @@ class FtpServer extends EventEmitter {
1312
constructor(options = {}) {
1413
super();
1514
this.options = Object.assign({
16-
log: buyan.createLogger({name: 'ftp-srv'}),
15+
log: console,
1716
url: 'ftp://127.0.0.1:21',
1817
pasv_min: 1024,
1918
pasv_max: 65535,

0 commit comments

Comments
 (0)