Logger: Fix timestamp and format (#5571)

* remove no-op config of logger

* add a test to check on the timestamp

* add a test to verify that we
get non json console loggging by default

* configure transports to include
timestamps in files

* Add failing test to confirm that WinstonLoggerAdapter
is not filtering on level.

* actually fix the test to refelect the facth that this isn't the problem

* Remove bogus date ranges that are now failing
becuase we have timestamps.
This commit is contained in:
Arthur Cinader
2019-05-09 12:58:54 -07:00
committed by Diamond Lewis
parent 81ecf2fd74
commit 87da62bca2
4 changed files with 62 additions and 21 deletions

View File

@@ -66,6 +66,22 @@ describe('error logs', () => {
}
);
});
it('Should filter on query', done => {
const winstonLoggerAdapter = new WinstonLoggerAdapter();
winstonLoggerAdapter.log('error', 'testing error logs');
winstonLoggerAdapter.query(
{
from: new Date(Date.now() - 500),
size: 100,
level: 'error',
},
results => {
expect(results.filter(e => e.level !== 'error').length).toBe(0);
done();
}
);
});
});
describe('verbose logs', () => {