Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to create a string transport logger for testing #33

Closed
tripodsan opened this issue Jan 17, 2019 · 0 comments
Closed

Add ability to create a string transport logger for testing #33

tripodsan opened this issue Jan 17, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tripodsan
Copy link
Contributor

Is your feature request related to a problem? Please describe.
for testing log output of the cli commands, it would we nice to have a string-only transport, so the test log files don't need to be read. this also would work around the flushing issue in winstonjs/winston#1504.

Describe the solution you'd like
when specifying /dev/text as logfile in Logger.getLogger(), a string based transport is created.
there should also be a way to retrieve the output, maybe by overriding the close() method so that:
const output = await log.close() returns the output.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant