https://github.com/mathieu2301/notion-logs
Notion API for application logging
https://github.com/mathieu2301/notion-logs
cloud-logging console logging metrics notion
Last synced: 2 months ago
JSON representation
Notion API for application logging
- Host: GitHub
- URL: https://github.com/mathieu2301/notion-logs
- Owner: Mathieu2301
- Created: 2021-05-14T01:50:20.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-26T22:30:36.000Z (over 3 years ago)
- Last Synced: 2025-02-16T11:26:24.342Z (3 months ago)
- Topics: cloud-logging, console, logging, metrics, notion
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notion Logs
Notion API for application logging## Requirements
You need a Notion bot and a Notion database with following properties :
- "Type": select (Log | Info | Success | Warning | Error)
- "Tags": multi-select (as you want)
- "Title": title / textThis API allows you to add lines to this database.
___
## Installation```
npm i notion-logs
```## Example (test.js)
```javascript
// Init notion-logs
const notionLogs = require('notion-logs')({
secret: process.env.NOTION_SECRET, // Notion bot secret
database: process.env.NOTION_DATABASE, // Notion database ID
});// Example of log
notionLogs('LOG', [], 'Test', {
Key1: {
key1: {
subKey1: 'Sub value 1',
subKey2: 'Sub value 2',
},
key2: 'Value 1',
},
Key2: 'Root value 1',
});```
___
## Problems
If you have errors in console or unwanted behavior, please create an issue [here](https://github.com/Mathieu2301/Notion-Logs/issues).