Get Log from OBS

revanhernandy

New Member
Hi All,

I'am using OBS in the cloud and streaming it to youtube. Sometimes the connection to youtube is disconnected and I need to re-connecting to the youtube RTMP.
I need to monitor the logs with PowerShell if the string-pattern 'disconnected' appear so I can re-connect immediately. I had a look at App Data --> Roaming --> obs-studio --> logs but its not quite good logs rotate (no date only time) so it getting confused.

Is there another way to collect the logs from OBS? or can set the parameters in some configuration files on OBS to make log rotation every day?

Thank you in advance
 

WBE

Member
OBS Studio logs do not contain datetime but the filenames do. If you use OBS in the cloud, do you refer to Streamlabs' product? Then please refer to their website for support, maybe logfiles are different then...
 

wilderf353

Member
I have a Python script that uses log files too. Here is the code to find the current log file. Maybe you can do something similar?


Code:
def getLatestLogFile():
    
    global glog_folder
    
    p = glog_folder + r"\*"
    list_of_files = glob.glob(p)
    latest_file = max(list_of_files, key=os.path.getctime)
    
    return latest_file
 

FerretBomb

Active Member
OBS Studio is not designed for automated or 24/7 usage, it's meant to be used as a live production tool.
The logfile is created on start of session (when OBS is first run) with that time and datestamp; inside, the lines are only timestamped as it is not meant to be run for days at a time.

If you need an RTMP video jukebox, there are dedicated pieces of software for that like Red5. Likewise for security monitoring at remote sites. It's a question of not using a screwdriver to try to drive nails. You can DO it, but it's not going to work well or comfortably.
 

Lawrence_SoCal

Active Member
I'am using OBS in the cloud and streaming it to youtube. Sometimes the connection to youtube is disconnected and I need to re-connecting to the youtube RTMP.

As noted above, Please clarify what you mean OBS in the cloud. As OBS Studio is a locally installed product. On the other hand, Streamlabs OBS [SLOBS] is a derivative version of OBS Studio, with the front-end hacksawed off and a webpage slapped over the top by the Streamlabs folks. You need to reach out to Streamlabs <https://support.streamlabs.com/hc/en-us> for support with their forked version.

As for OBS Studio, it has a default option to re-connect, which is adjustable in the Settings section, though beware trying to make the re-connect too short. Something is happening on your system (overload) or the network, and that needs time to pass otherwise you may just pile on and make situation worse if you get too aggressive
 

revanhernandy

New Member
Hi All,

Thank you for your attention.

Ok, I agree that OBS is not designed for automated or 24/7 usage. I just want to know when the OBS is disconnected from the youtube RTMP. Then I will be restarting the youtube session manually.

I have SNMP monitoring to the OBS but it seems not reliable, because the OBS seems always send the stream bandwith even though the session was ended.
 
Top