Transport logs and events with backup capabilities
293
transport and process your log events. Simplest way to use is with util which runs the log in the background logger
For more information checkout docs
npm installnpm run devHeres 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
use the docker image https://hub.docker.com/r/jeffmendez19/logger
check the license file in the root of the project.
Content type
Image
Digest
Size
80.6 MB
Last updated
over 5 years ago
docker pull jeffmendez19/logger