The name and icon of the bot are up to you when creating a webhook (Right-click on channel > Edit channel > Integrations).
git clone [email protected]:jehanf/apache-log-to-discord.git
cd apache-log-to-discord
npm install
node index.js /path/to/logfile.log https://discord/webhook/url
Make tail.sh
executable
sudo chmod +x /path/to/apache-log-to-discord/tail.sh
Then :
nohup /path/to/apache-log-to-discord/tail.sh /path/to/apache-log-to-discord/index.js "/path/to/logfile.log" "https://discord/webhook/url" > /dev/null 2>&1 &
Make tail.sh
executable
sudo chmod +x /path/to/apache-log-to-discord/tail.sh
Then :
crontab -e
- Add
@reboot /path/to/apache-log-to-discord/tail.sh /path/to/apache-log-to-discord/index.js "/path/to/logfile.log" "https://discord/webhook/url"
- Repeat 1 and 2 for each log you want to add