@nonconforme/stencil-logger

Stencil logger Plugin

Usage no npm install needed!

<script type="module">
  import nonconformeStencilLogger from 'https://cdn.skypack.dev/@nonconforme/stencil-logger';
</script>

README

@stencil/logger

This package is used to log all requests from your Stencil component.

First, npm install within the project:

npm install @stencil/logger --save-dev

Stencil component

First, you need to import the stencil-logger module into your StencilJS component.

import * as Logger from '@nonconforme/stencil-logger';

Next, you have to load the logger module and initialise it.

this.loggerConfig = {
  clientLogLevel: 'info',
  serverLogLevel: 'error',
  appName: environment.CONTEXT_URI.toUpperCase(),
  serverUri: environment.loggerConfig.serverUri,
  path: environment.loggerConfig.path,
  token: this.token
};
Logger.logger(LoggerConfig);

Related

Contributing

Please see our Contributor Code of Conduct for information on our rules of conduct.