STREAMING CONNECT/DISCONNECT LOG FILE

You are missing a feature or need an enhancement? Post your suggestion here!
gawrecordings
Posts: 2
Joined: 02 Apr 2014 23:12
STREAMING CONNECT/DISCONNECT LOG FILE

Post by gawrecordings »

I don't if what i'd like already exists in PF.

I'm using PF to send a SHOUTCAST STREAM.
It works great !

Sometimes, of course, I've got disconnections of the audio STREAM and sometimes it is only a few hours after the last connection.
Maybe it comes from our server, maybe from our DSL line, etc.
I'm trying to solve every problem that could increase our UPTIME.
I'm not listening to our stream 24hours a day and PF shows only the last reconnection.

So, I'd be glad to have a log file dedicated to the STREAM and the connections/disconnections noticed by PF so I could have a clear idea of our webradio UPTIME !
It would be also handy and interesting for us to compare it with our DSL uptime logs.

Would it be possible to have this simple log option for each stream, kinda:

dd/mm/yyyy at xx:xx:xx CONNECTED TO server xxxx
dd/mm/yyyy at xx:xx:xx DISCONNECTED from server xxx

So I could easily check the uptime !

Thank you very much !
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by radio42 »

No, ProppFrexx has no automatic log for the streaming servers.
But you can easily implement them yourself...

Each streaming server has individual control-command events.
I.e. you can use the 'On Disconnected' resp. 'On Reconnected' event to log such things.

The control-command to use would be the generic EXEC_WRITE_FILE:
Parameter: filename|mode|content
Note: Mode can be aa=Append-ASCII, au-Append-UTF8, ah-Append-HTTP, ad-Append-Default or na=New-ASCII, nu=New-UTF8, nh=New-HTTP, nd=New-Default

Example:
'On Disconnected' event for Server X:

Code: Select all

EXEC_WRITE_FILE C:\log.txt|au|${now} ${streamingservername} Disconnected
'On Reconnected' event for Server X:

Code: Select all

EXEC_WRITE_FILE C:\log.txt|au|${now} ${streamingservername} Reconnected
...
gawrecordings
Posts: 2
Joined: 02 Apr 2014 23:12
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by gawrecordings »

It works great !
I've only a last detail question, how to make a line break after each written line?

Thank you a lot.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by radio42 »

Ohh, just add the following to the end of the command:
${CRLF}
Derek
Posts: 11
Joined: 13 Feb 2017 07:52
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by Derek »

Good afternoon guys, I was following this topic as it is very interesting and testing myself.
After inserting this code, which should be the correct code I guess:

\\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\log.txt|au|${now} ${streamserver} Server started ${CRLF}

I do only see this is my .text file

2018-02-07 13:00:57 Server stopped2018-02-07 13:01:00 Server stopped2018-02-07 13:03:56 Server stopped2018-02-07 13:03:59 Server stopped

As you can see, the breakline is not working AND the name of the streamserver is not appearing.
I also tested by putting the name of the streamserver between the {} instead of {streamserver} but still nothing

Any suggestions?
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by radio42 »

Can you please post your full control command, as the macro replacements depend a bit on where exactly it is used.
Derek
Posts: 11
Joined: 13 Feb 2017 07:52
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by Derek »

BERND,

I used it in the Control Command Builder of a test streamer.

On server started:

EXEC_WRITE_FILE \\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\log.txt|au|${now} ${streamserver} Server started ${CRLF}
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by radio42 »

Just tested it here and it works like it should be - no problem.
Each line written to the file ends with a carriage return and a line feed char (\r\n).

BUT note, that ${streamserver} is NOT a valid and recognized macro. Maybe you wanted to use ${streamingservername} ?
Please see the Appendix of the User Manual for a complete list of macros.
Derek
Posts: 11
Joined: 13 Feb 2017 07:52
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by Derek »

HI BERND,
I wonder why it is not working here.
In the log files everything writes one after another without mentioning the ${streamingservername} and no line break

2018-02-08 07:42:26 Server stopped2018-02-08 07:42:31 Server stopped2018-02-08 07:44:18 Server started2018-02-08 07:45:31 Server started2018-02-08 07:45:34 Server started2018-02-08 07:46:06 Server started2018-02-08 07:49:55 Server stopped2018-02-08 07:50:15 Server stopped2018-02-08 07:52:25 Connection lost2018-02-08 07:52:56 Connection re-established

Could it be because all the events are within the same day?
Why does it not mention the ${streamingservername}

These are the commands I use:

ON SERVER STARTED - EXEC_WRITE_FILE
\\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\Massimo server BG.txt|au|${now} ${streamingservername} Server started ${CRLF}

ON SERVER STOPPED - EXEC_WRITE_FILE
\\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\Massimo server BG.txt|au|${now} ${streamingservername} Server stopped ${CRLF}

ON DISCONNECTED - EXEC_WRITE_FILE
\\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\Massimo server BG.txt|au|${now} ${streamingservername} Connection lost ${CRLF}

ON RECONNECTED - EXEC_WRITE_FILE

\\W10_image\bg-ftp\PF FTP\_GENERAL BG FILES\Stream logs\Massimo server BG.txt|au|${now} ${streamingservername} Connection re-established ${CRLF}
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: STREAMING CONNECT/DISCONNECT LOG FILE

Post by radio42 »

Please post a screenshot of your event definition - there is probably some error somewhere with it...

Post Reply