Dear Mugen Team,
After some time, no new informations are send to the karaoke Mugen log file.
When I open the the Log in Mugen, all the messages directly appears in the log file at once.
We are using a script, that is looking for the stop/start messages to trigger our light console, so after some time, the script is not working, because no informations are send to the karaoke Mugen log.
Best Regards,
Niklas
Now that’s weird.
Is it looking into the file log itself ? COuld it be that it happened after midnight where logs are rotated automatically?
Hi Axel, we are using the Logfile directly.
When we open it as with a text editor, it also contains no new informations
#!/bin/bash
DATE=$(date '+%Y-%m-%d')
# Set the log file to monitor
LOG_FILE="/Users/niklas/Library/Application Support/karaokemugen-app/app/logs/karaokemugen-${DATE}.log"
echo Using the following Karaoke Mugen Log:
echo $LOG_FILE
# Function to execute the MIDI command ON
send_midi_command_on() {
sendmidi dev "IAC-Treiber Bus 1" on 1 1
echo "Lights are turning on"
echo "MIDI command sent: sendmidi dev "IAC-Treiber Bus 1" on 1 1"
date
}
# Function to execute the MIDI command OFF
send_midi_command_off() {
sendmidi dev "IAC-Treiber Bus 1" on 1 1
echo "Lights are turning off"
echo "MIDI command sent: sendmidi dev "IAC-Treiber Bus 1" on 1 1"
date
}
# Monitor the log file for the keyword "stop" or "Playing "
tail -F "$LOG_FILE" | while read -r line; do
if [[ "$line" == *"Karaoke stopping NOW"* ]]; then
send_midi_command_on
fi
if [[ "$line" == *"Playing "* ]]; then
send_midi_command_off
fi
done
Best Regards,
Niklas
It happens after about 30-60 Minutes
Script has been started today 10:00
Technically nothing should prevent the log file from being wirtten to. Even on macOS. We’ll need to try to investigate that sometime yeah
Here a directly view of the log file:
I’ve left it running for 70 minutes on our mac mini and your script still works here. It picks up when a song is played still, so I’m not able to reproduce your issue for some reason