cn007b / log

⭐️ This is super simple REAL-TIME log (logger for logging logs). I've built this tool for debug purposes. The main aim of the project - just show to user logs published from any application layer.

Home Page:https://realtimelog.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is simple REAL-TIME log.

Build Status Scrutinizer Code Quality Coverage Status Maintainability PyPI PRs Welcome

Demo: how to use REAL-TIME log

Just open main page obtain your unique streamId (you will be redirected) or open certain stream (specify streamId in url like: https://realtimelog.herokuapp.com/test) and start listen you real time logs!!!

Under the hood, this log works with WebSockets so you will see logs immediately in your browser!

With the purpose to post something in your log stream use any code from examples below.

JavaScript:

fetch('https://realtimelog.herokuapp.com/test', {
  method: 'post', headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({code: 200, status: 'OK'})
});

NodeJS:

const r = require('https').request({
  host: 'realtimelog.herokuapp.com',
  path: '/test',
  method: 'POST',
  headers: {'Content-Type': 'application/json'}
});
r.write(JSON.stringify({code: 200, status: 'OK'}));
r.end();

Go:

import (
  "bytes"
  "encoding/json"
  "net/http"
)
j, _ := json.Marshal(map[string]string{"code": "200", "status": "OK"})
http.Post("https://realtimelog.herokuapp.com/test", "application/json", bytes.NewBuffer(j))

PHP:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://realtimelog.herokuapp.com/test');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['code' => 200, 'status' => 'OK']));
curl_exec($ch);
// OR
exec("curl -s https://realtimelog.herokuapp.com/test -H 'Content-Type: application/json' -d '".json_encode(['code' => 200])."'");

Python:

import requests
import json
requests.post(
  'https://realtimelog.herokuapp.com/test',
  data=json.dumps({'code': 200, 'status': 'OK'}),
  headers={'Content-Type': 'application/json'},
)

Bash:

curl -XPOST 'https://realtimelog.herokuapp.com/test' \
-H 'Content-Type: application/json' -d '{"code": 200, "status": "OK"}'
// OR
["sh", "-c", "curl -XPOST 'https://realtimelog.herokuapp.com:443/test' -H 'Content-Type: application/json' -d '{\"code\": 200}'"]

Sponsors

JetBrains

About

⭐️ This is super simple REAL-TIME log (logger for logging logs). I've built this tool for debug purposes. The main aim of the project - just show to user logs published from any application layer.

https://realtimelog.herokuapp.com/

License:MIT License


Languages

Language:JavaScript 65.7%Language:Pug 25.1%Language:CSS 9.2%