Access Logs via webpanel

phantombot
#1

Hello. I have a feature request.

Are there future projections to implement a system where we can access the chatlogs via the webpanel?

Sinterests

0 Likes

#2

im pretty sure
A. twitch doesnt have an api for that
B. with a big bot that could slow the bot down a lot thats why we have text file logs

0 Likes

#3

Alright. Understandable. But is there no way by pulling data from the logfiles to the webpanel without using API’s?

Or a Export button for example.
You define the Date with a dropdown date picker or similar. And then export it to your device.

0 Likes

#4

If you want a system that is built for analyzing and presenting logs, I highly recommend the ELK stack (https://www.elastic.co/elk-stack). It takes some work to configure it but once you do it is amazing.

A download button may be a doable option as well, as Dakoda says, that could really hamper the performance of the panel. Remember, everything is done client side so the size of logs for large chats would be memory required in the browser for loading and making the data available.

You can pull the logs using the webserver built into PhantomBot:

[morpheus] /opt/iobot/config
illusion% curl -X GET -H 'webauth: f0v3ZkKVG....' http://localhost:27000/logs/error
01-01-2019.txt
01-07-2018.txt
03-12-2018.txt
04-01-2019.txt
04-05-2018.txt
05-05-2018.txt
07-08-2018.txt
08-05-2018.txt
08-08-2018.txt
....
[morpheus] /opt/iobot/config
illusion% curl -X GET -H 'webauth: f0v3Z.....' http://localhost:27000/logs/error/13-03-2019.txt
[03-13-2019 @ 19:22:19.201 MDT] [init.js:325] Error with Event Handler [yTPlayerState] Script [./systems/youtubePlayer.js] Stacktrace [youtubePlayer.js:1248 > init.js:323 > init.js:748] Exception [TypeError: Cannot call method "setVolume" of null]
[03-13-2019 @ 19:22:19.198 MDT] [init.js:325] Error with Event Handler [yTPlayerRequestSonglist] Script [./systems/youtubePlayer.js] Stacktrace [youtubePlayer.js:1222 > init.js:323 > init.js:762] Exception [TypeError: Cannot call method "pushSongList" of null]
[03-13-2019 @ 19:22:19.232 MDT] [init.js:325] Error with Event Handler [yTPlayerRequestPlaylist] Script [./systems/youtubePlayer.js] Stacktrace [youtubePlayer.js:1229 > init.js:323 > init.js:769] Exception [TypeError: Cannot call method "pushPlayList" of null]
0 Likes