Full timestamp (date and time) on the events of the LOG file or a LOG event line that indicates the start of a new day

Danilo Roxette

New Member
Hello. I've been using OBS for almost a decade and I'm an enthusiast. I would like to thank all the people who make it better every day. I searched, without success, for any similar suggestion to the one I register now:

  • It would be very useful if OBS LOGs keeps the complete timestamp (with date and time) of the events and not just the hours, or a LOG event line that indicates the start of a new day.

Below, I explain my case on how the lack of date has been a problem:

Since the last year, I'm technically monitoring a transmission of an educational TV channel from a Brazilian public university ( Universidade Federal de Ouro Preto - https://eduplay.rnp.br/portal/tv/ufop ) that is maintained 24/7 and we have a large recurrence of errors on the network that I need to report regularly. To do this, I use the LOGS generated by OBS, but I deal with the serious deficiency of DATE information in the LOGS.

The complete timestamp (with date) is only recorded the first time the program is opened (and it is the date that appears in the file name). After that, the date is NOT recorded anymore and the log only register the HOURS of each occurrence. As the stream we maintain is 24/7, I cannot find out the specific date on which a certain error occurred.

Analyzing the hours, I can estimate a day turn, but the estimative rarely work because if OBS got a successful stream that keeps it for more than 24 hours without registering any incident, my date estimative will not work. To avoid this, for a while, I tried to process the logs every day, but I can't do it regularly. So, I would love to see the dates on every log event, or, at least, a log event line when a new day begin.

Attached is a log that, according to my control, was valid during transmissions from 2023-08-27 to 2023-09-04 (8 days). I can estimate a day turn when I see the logs with the time 20:19:39.497 jumping to 10:30:43.531, and 12:08:03.136 jumping to 11:04:44.599, but as I said, this logs should cover 8 days of streams but apparently it's only covering possible 3 days, (the first one with the provided date log information and 2 of them with a date turn estimate by hours analysis).


Thanks by advance.
 

Attachments

  • 2023-08-27 10-50-19.txt
    101.5 KB · Views: 31

AaronD

Active Member
If you were on a Debian-based Linux distribution (other distros might be similar), you could sudo apt install moreutils, and then call OBS like: obs [options] 2>&1 | ts >> your_log_file

ts = timestamp. It takes its stdin, prepends each line with the complete system date and time, and spits it back out to stdout.

>> appends to your_log_file.
> would replace it.

2>&1 directs stderr to the same place that stdout is going, so that the pipe | sends both to ts' stdin.

This all works because OBS's log entries go *both* to the file *and* to stdout and stderr.

---

If you're game to try that, I'd recommend Ubuntu Studio:
It's based on Ubuntu, which is based on Debian, and designed specifically for media production. It has a TON of stuff preinstalled and "just working". OBS v27 is one of them. Another command-line, followed by the normal update process, gives you the current version, and THEN you can re-build your rig. (don't until after you've updated; that particular update will wipe out whatever you've done)
sudo apt-add-repository ppa:obsproject/obs-studio
 
Last edited:

Danilo Roxette

New Member
Hi, AaronD. TY for your message.

Actually, right now, we need that OBS runs through a Windows 10 system. I looked superficially if I could implement these same setup in Windows and it didn't seem so simple. I don't know anything about powershell.

We've already run OBS with some lauch arguments; it launches two instances of different profiles and scenes and starts streaming automatically.

I forgot to mention in the initial post that among the OBS Launch Parameters there are --verbose and --unfiltered_log. Unfortunately they also don't add the current date and time to the log events.

If we adopt Linux someday I will certanly do the stdout setup that you kindly wrote me. Thank you.

I`m still looking for a way to get it.
 
Top