twitch logging platform
Find a file
2020-12-02 18:35:44 +01:00
.github/workflows shorten gh link in actions 2020-11-18 19:22:33 +01:00
api fix channel limit 2020-12-02 18:35:44 +01:00
archiver double check if we actually try to open a dir 2019-08-18 11:08:27 +02:00
bot api to leave and join channels 2020-10-08 21:52:58 +02:00
config add docker docs, change default listen to expose in container 2020-11-22 12:38:07 +01:00
filelog add list endpoint 2020-05-31 14:58:32 +02:00
helix remove unused 2020-11-08 19:11:27 +01:00
humanize add tests for humanize 2019-08-18 11:38:54 +02:00
web userid searches now link the correct txt foxes #81 2020-11-27 17:14:39 +01:00
.gitignore simplify webpack setup 2020-09-05 12:15:35 +02:00
config.json.dist add option to disable archiving 2020-10-01 00:39:59 +02:00
Dockerfile new cmd 2019-05-17 21:54:38 +02:00
go.mod added autocomplete 2020-11-08 20:00:14 +01:00
go.sum added autocomplete 2020-11-08 20:00:14 +01:00
LICENSE use json config and enable arguments 2018-11-29 22:20:57 +01:00
main.go add option to disable archiving 2020-10-01 00:39:59 +02:00
Makefile use swagger to generate some test docs 2020-12-01 22:52:42 +01:00
README.MD add docker docs, change default listen to expose in container 2020-11-22 12:38:07 +01:00

justlog Build Status

What is this?

justlog is a bot I maintain for a couple of channels. Its features differ from other bots in that it doesn't support commands, etc. yet, it focuses on logging and providing an api for the logs.

Docker

mkdir logs # Make sure the log folder is set correctly in your config, we need to create it first to have correct permissions
docker run -p 8025:8025 --user $(id -u):$(id -g) -v $PWD/config.json:/etc/justlog.json -v $PWD/logs:/logs ghcr.io/gempir/justlog

Commands

  • !justlog status will respond with uptime
  • !justlog join gempir,pajlada will join the channels and append them to the config
  • !justlog messageType gempir 1,2 will set the recorded message types to 1 and 2 in channel gempir (will fetch the userid on its own)
  • !justlog messageType gempir reset will reset to default

Config

{
    "admins": ["gempir"], // will only respond to commands executed by these users
    "logsDirectory": "./logs", // the directory to log into
    "adminAPIKey": "noshot", // your secret api key to access the admin api (documented below)
    "username": "gempbot", // bot username (can be justinfan123123 if you don't want to use an account)
    "oauth": "oauthtokenforchat", // bot token can be anything if justinfan123123
    "clientID": "mytwitchclientid", // your client ID, needed for fetching userids or usernames etc
    "clientSecret": "mysecret", // your twitch client secret
    "logLevel": "info", // the log level, keep this to info probably
    "channels": ["77829817", "11148817"], // the channels (userids) you want to log
    "archive": true, // probably keep to true, will disable gzipping of old logs if false, useful if you setup compression on your own
    "channelConfigs": {
        "77829817": { // only applies to this channel
            "messageTypes": [1] // will only log messages of type 1 (check go-twitch-irc MessageType https://github.com/gempir/go-twitch-irc/blob/master/message.go#L17), default is all 
        }
    }
}

Admin API

POST /admin/channelConfigs/{channelID}

Will set the messageTypes logged for a channel

Headers
X-Api-Key: yourcoolapikey
Body
{
    "messageTypes": [1]
}

DELETE /admin/channelConfigs/{channelID}

Will reset the messageTypes logged for a channel

Headers
X-Api-Key: yourcoolapikey
Body
{
    "messageTypes": true
}

POST /admin/channels

Will add the channels to log

Headers
X-Api-Key: yourcoolapikey
Body
{
    "channels": ["77829817"]
}

DELETE /admin/channels

Will remove the channels to log

Headers
X-Api-Key: yourcoolapikey
Body
{
    "channels": ["77829817"]
}