Wowza Community

put RTMP IMediaStream log

Hello

i want get wowza logs.

event “Playing” is custom event.

i wnats logs form are like this

#Fields: x-severity x-category x-event date time c-client-id c-ip c-port cs-bytes sc-bytes x-duration x-sname x-stream-id x-spos sc-stream-bytes cs-stream-bytes x-file-size x-file-length x-ctx x-comment

HTTP / RTSP stream log

INFO stream playing 2015-11-24 10:45:00 254104926 0:0:0:0:0:0:0:1 - 0 2322246 26.115 sample.mp4 1 24725 2322246 0 58958409 634.633 sample.mp4 -

INFO stream playing 2015-11-24 10:45:00 674141943 0:0:0:0:0:0:0:1 - 0 2761139 19.485 sample.mp4 2 30000 2757558 0 58958409 634.633 sample.mp4 -

but RTMP Stream log is this.

wowza native logs are OK

custom log is not OK

RTMP stream log

INFO session connect-pending 2015-11-24 10:38:22 966362376 0:0:0:0:0:0:0:1 - 3497 3073 0.011 - - - - - - - 0:0:0:0:0:0:0:1 -

INFO session connect 2015-11-24 10:38:22 966362376 0:0:0:0:0:0:0:1 - 3497 3073 0.013 - - - - - - - 0:0:0:0:0:0:0:1 -

INFO stream create 2015-11-24 10:38:22 966362376 0:0:0:0:0:0:0:1 - 3547 3413 0.002 - 1 - 0 0 0 0.0 - -

INFO stream play 2015-11-24 10:38:23 966362376 0:0:0:0:0:0:0:1 - 3623 3455 0.09 sample.mp4 1 0 0 0 58958409 634.633 sample.mp4 -

INFO stream playing 2015-11-24 10:45:00 - - - - - 436.474 sample.mp4 1 442283 41368321 0 58958409 634.633 - -

get log code

// RTMP

	private void loggingVHost() {
		
		for(String vhostName : (List<String>) VHostSingleton.getVHostNames()){
			IVHost vhost = (IVHost) VHostSingleton.getInstance(vhostName);
			if(vhost == null) continue;	// is it needed ? 2014-01-28
			for(String appName : (List<String>)vhost.getApplicationNames()){
				IApplication application = vhost.getApplication(appName);
				if (application == null) continue;
				// create instance logs
				for(String appInstName : application.getAppInstanceNames()){
					IApplicationInstance appInst = application.getAppInstance(appInstName);
					// RTMP
					List<IClient> clients = appInst.getClients();
					if(clients != null){
						System.out.println("RTMP");
						for(IClient client : clients){
							 client.getPlayStreams();
							List<IMediaStream> streams = client.getPlayStreams();
							for(IMediaStream stream : streams){
								logger.info("", stream, "stream", "playing", 200, "");
								System.out.println(stream.getProperties().toString());
								//System.out.println(stream.getProperties().toString());
							}
						}
					}
					for(IMediaStream stream : application.getAppInstance(appInstName).getStreams().getStreams()){
						// HTTP Stream
						IHTTPStreamerSession httpSession = stream.getHTTPStreamerSession();
						if(httpSession != null){
							System.out.println("HTTP");
							logger.info("", stream, "stream", "playing", 200, "");
						}
						// RTSP/RTP
						RTPStream  rtpStream  = stream.getRTPStream();
						if(rtpStream != null){
							System.out.println("RTSP");
							logger.info("", stream, "stream", "playing", 200, "");
						}				
					}
				}
			} // end of for
		} // end of for
	}

use listeners info.

RTMP client listener use IMediaStreamActionNotify3

HTTP / RTSP client listener use IMediaStreamActionNotify

How Can I get the results you want ?

please help me.