Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.