Sign inSign up

jeffmendez19/logger

By jeffmendez19

•Updated over 5 years ago

Transport logs and events with backup capabilities

Image
0

293

jeffmendez19/logger repository overview

⁠logger

A11yWatchcodecov

transport and process your log events. Simplest way to use is with util which runs the log in the background logger⁠

⁠Getting started

For more information checkout docs⁠

  1. npm install
  2. npm run dev
⁠example

Heres an example of using the logger util to log events to logger.

import { log, setLogConfig } from "@a11ywatch/log"

setLogConfig({ container: "my app" });

log('some event', {'platform': 'chrome'})

try {
  someMethod()
} catch (e) {
 log(e)
}

or

curl --location --request POST 'http://localhost:8022/api/log' \
--header 'Content-Type: application/json' \
--data-raw '{"type": "info", "message": "A11y is the word", "platform": "ios", "container": "angelica" }'
// res:  { "status": 200}

check http://localhost:8022/api/log?type=info⁠ to see output of logs

⁠Docker

use the docker image https://hub.docker.com/r/jeffmendez19/logger⁠

⁠LICENSE

check the license file in the root of the project.

Tag summary

Content type

Image

Digest

Size

80.6 MB

Last updated

over 5 years ago

docker pull jeffmendez19/logger