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

chore(extension-logging): fix typos and clean up descriptions #4575

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,28 @@ import {readLog} from '../fixtures/fluentd.docker';

const sleep = promisify(setTimeout);

describe('LoggingComponent', () => {
describe('LoggingComponent', function() {
let app: Application;

// eslint-disable-next-line no-invalid-this
this.timeout(10000);

beforeEach(givenAppWithCustomConfig);

/* eslint-disable no-invalid-this */
it('binds a fluent sender', async function() {
if (process.env.FLUENTD_SERVICE_PORT_TCP == null) return this.skip();
const sender = await app.get(LoggingBindings.FLUENT_SENDER);
sender.emit({greeting: 'Hello, LoopBack!'});
await sleep(100);
await sleep(500);
await expectLogsToMatch(/LoopBack\s+\{"greeting"\:"Hello, LoopBack!"\}/);
});

it('binds a winston transport for fluent', async function() {
if (process.env.FLUENTD_SERVICE_PORT_TCP == null) return this.skip();
const logger = await app.get(LoggingBindings.WINSTON_LOGGER);
logger.log('info', 'Hello, LoopBack!');
await sleep(100);
await sleep(500);
await expectLogsToMatch(
/LoopBack\s+\{"level"\:"info","message":"Hello, LoopBack!"\}/,
);
Expand Down
2 changes: 1 addition & 1 deletion extensions/logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This module contains a component provides logging facilities based on
[Winston](https://github.com/winstonjs/winston) and
[Fluentd](https://github.com/fluent/fluent-logger-node).

## Stability: :warning:Experimental:warning:
## Stability: ⚠️Experimental⚠️

> Experimental packages provide early access to advanced or experimental
> functionality to get community feedback. Such modules are published to npm
Expand Down
3 changes: 2 additions & 1 deletion extensions/logging/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@loopback/extension-logging",
"version": "0.0.1",
"description": "LoopBack Logging for Fluentd",
"description": "LoopBack Logging for Winston and Fluentd",
"engines": {
"node": ">=8.9"
},
Expand Down Expand Up @@ -36,6 +36,7 @@
"LoopBack",
"Cloud Native",
"Fluentd",
"Winston",
"Logging"
],
"files": [
Expand Down