Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apex/logs-js
Apex Logs client for Node, Deno, and the browser
https://github.com/apex/logs-js
apex-logs deno denoland javascript-library logging logs typescript-library
Last synced: 2 months ago
JSON representation
Apex Logs client for Node, Deno, and the browser
- Host: GitHub
- URL: https://github.com/apex/logs-js
- Owner: apex
- License: mit
- Created: 2020-07-13T10:22:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T14:18:22.000Z (over 4 years ago)
- Last Synced: 2024-10-17T18:46:32.525Z (3 months ago)
- Topics: apex-logs, deno, denoland, javascript-library, logging, logs, typescript-library
- Language: TypeScript
- Homepage: https://apex.sh/logs/
- Size: 29.3 KB
- Stars: 38
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
JavaScript client for [Apex Logs](https://apex.sh/logs/) with support for Node.js, Deno, and the browser.
## Installation
```
npm install --save apex-logs
```## Node
Here's an example of usage in Node or the browser using the `apex-logs` NPM package:
```js
const { Client } = require('apex-logs')const client = new Client({
url: '',
authToken: ''
})async function run() {
const { projects } = await client.getProjects()
console.log(projects)
const { alerts } = await client.getAlerts({ projectId: 'production' })
console.log(alerts)
}run()
```## Deno
Here's an example of usage in Deno:
```js
import { Client } from 'https://deno.land/x/apex_logs/client.ts'const client = new Client({
url: '',
authToken: ''
})const { projects } = await client.getProjects()
console.log(projects)const { alerts } = await client.getAlerts({ projectId: 'ping_production' })
console.log(alerts)
```## Resources
To learn more about Apex Logs visit the [documentation](https://apex.sh/docs/logs/), and to contribute to this client visit the [github.com/apex/rpc](https://github.com/apex/rpc/) project which is used to generate this client.