@miketako3/cloki 0.1.12 → 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 +21 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,18 +1,23 @@
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
- [![npm version](https://badge.fury.io/js/@miketako3%2Fcloki.svg)](https://badge.fury.io/js/@miketako3%2Fcloki)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+ [![NPM Version](https://img.shields.io/npm/v/%40miketako3%2Fcloki)](https://www.npmjs.com/package/@miketako3/cloki)
4
+ [![NPM License](https://img.shields.io/npm/l/%40miketako3%2Fcloki)](https://github.com/miketako3/cloki/blob/main/LICENSE)
5
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/miketako3/cloki/release.yaml)](https://github.com/miketako3/cloki/actions/workflows/release.yaml)
6
+ [![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/miketako3/cloki)](https://github.com/miketako3/cloki/releases)
7
+ [![GitHub commit activity](https://img.shields.io/github/commit-activity/y/miketako3/cloki)](https://github.com/miketako3/cloki/commits/main)
8
+ [![GitHub contributors](https://img.shields.io/github/contributors/miketako3/cloki)](https://github.com/miketako3/cloki/graphs/contributors)
9
+ [![NPM Downloads](https://img.shields.io/npm/dt/%40miketako3%2Fcloki)](https://www.npmjs.com/package/@miketako3/cloki)
5
10
 
6
11
  ## Introduction
7
12
 
8
- 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.
9
14
 
10
15
  ## Features
11
16
 
12
17
  - **Easy Integration**: Connect Cloudflare Workers with Grafana Cloud's Loki effortlessly.
13
18
  - **Minimal Configuration**: Get started with just a few simple settings.
14
- - **Cost-Effective**: Designed for developers looking to minimize overhead costs.
15
- - **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.
16
21
 
17
22
  ## Installation
18
23
 
@@ -20,15 +25,22 @@ Welcome to **cloki**, an open-source logger designed to bridge Cloudflare Worker
20
25
  $ npm i @miketako3/cloki
21
26
  ```
22
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
+
23
35
  ## Usage
24
36
 
25
37
  ```typescript
26
38
  import {Cloki} from '@miketako3/cloki'
27
39
 
28
40
  const logger = getLokiLogger({
29
- lokiHost: "${LOKI_HOST}",
30
- lokiUser: "${LOKI_USER}",
31
- 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"
32
44
  });
33
45
 
34
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.12",
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": [