@miketako3/cloki 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # cloki - Simple and Zero Dependency Logging Library from Cloudflare Workers to Grafana Cloud's Loki
1
+ # cloki - Zero Dependency and Simple Logging Library from Cloudflare Workers to Grafana Cloud's Loki
2
2
 
3
3
  [![NPM Version](https://img.shields.io/npm/v/%40miketako3%2Fcloki)](https://www.npmjs.com/package/@miketako3/cloki)
4
4
  [![NPM License](https://img.shields.io/npm/l/%40miketako3%2Fcloki)](https://github.com/miketako3/cloki/blob/main/LICENSE)
@@ -10,14 +10,14 @@
10
10
 
11
11
  ## Introduction
12
12
 
13
- Welcome to **cloki**, an open-source logger designed to bridge Cloudflare Workers with Grafana Cloud's Loki seamlessly and efficiently. Targeted at individual developers, cloki aims to reduce maintenance costs while offering a straightforward logging solution. With minimal configuration and the sole use of the fetch API, cloki is an easy-to-implement tool for effective logging.
13
+ Welcome to **cloki**, an open-source logger designed to bridge [Cloudflare Workers](https://www.cloudflare.com/developer-platform/workers/) with [Grafana Cloud's Loki](https://grafana.com/products/cloud/logs/) seamlessly and efficiently. Targeted at individual developers, cloki aims to reduce maintenance costs while offering a straightforward logging solution. With minimal configuration and the sole use of the fetch API, cloki is an easy-to-implement tool for effective logging.
14
14
 
15
15
  ## Features
16
16
 
17
17
  - **Easy Integration**: Connect Cloudflare Workers with Grafana Cloud's Loki effortlessly.
18
18
  - **Minimal Configuration**: Get started with just a few simple settings.
19
- - **Cost-Effective**: Designed for developers looking to minimize overhead costs.
20
- - **Pure Fetch API Usage**: No complex dependencies or setups, just the fetch API.
19
+ - **Zero Dependencies**: cloki has zero dependencies, making it easy to maintain.
20
+ - **Fetch API Usage**: cloki uses the Fetch API, so it can be used in any environment like edge runtime.
21
21
 
22
22
  ## Installation
23
23
 
@@ -25,15 +25,22 @@ Welcome to **cloki**, an open-source logger designed to bridge Cloudflare Worker
25
25
  $ npm i @miketako3/cloki
26
26
  ```
27
27
 
28
+ ## Grafana Cloud Setup
29
+
30
+ 1. Create a Grafana Cloud account from [here](https://grafana.com/).
31
+ 2. Access https://grafana.com/orgs/${YOUR_ORG_NAME}
32
+ 3. Click Detail. ![](static/image1.png)
33
+ 4. You got the required information. ![](static/image2.png)
34
+
28
35
  ## Usage
29
36
 
30
37
  ```typescript
31
38
  import {Cloki} from '@miketako3/cloki'
32
39
 
33
40
  const logger = getLokiLogger({
34
- lokiHost: "${LOKI_HOST}",
35
- lokiUser: "${LOKI_USER}",
36
- lokiToken: "${LOKI_TOKEN}"
41
+ lokiHost: "Host URL (e.g. logs-xxx-yyy.grafana.net)",
42
+ lokiUser: "User (e.g. 123456)",
43
+ lokiToken: "Generated API Token"
37
44
  });
38
45
 
39
46
  await logger.info({message: "Hello World!"});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miketako3/cloki",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "cloki is zero dependency and simple logger library for Loki and Cloudflare Workers.",
5
5
  "main": "dist/index.js",
6
6
  "files": [