In the dialog you must create a txt-file and set to “Overwrite this file each time a log entry is written”.
UTF-8 is recommended if some characters may cause trouble.
If you only want to log music items but no jingles, station-ids etc., please use the filter function.
Test & try it to find the best log for your stream. Have fun!
Unfortunately the logging is not working for external streams passing through. They can update the Encoder but are not passed over to the logging interface.
Neither on streams within a player nor on streams via stream monitor.
// Called when metadata is received from a (relayed) stream
procedure OnItemMetadata(Item: IPlaylistItem; Metadata: string);
var
sl: TStringList;
begin
sl := TStringList.Create;
try
sl.Add(Metadata);
sl.SaveToFile('C:\sometextfile.txt');
finally
sl.Free;
end;
end;
EDIT: Or even easier with mAirList’s ref-counted IStrings interface:
// Called when metadata is received from a (relayed) stream
procedure OnItemMetadata(Item: IPlaylistItem; Metadata: string);
var
sl: IStrings;
begin
sl := Factory.CreateStrings;
sl.Add(Metadata);
sl.SaveToFile('C:\sometextfile.txt');
end;
Thanks, is there a way to trigger any built in Logging, that is already configured, to have the same output as if a player is running?
I want the relayed stream, so there is no need to maintain various scripts fot various logging outputs. One of my customers is using http get logging or mySQL logging. I did not double check.
The problem is that the logging interfaces uses all the invidual item properties (artist, title, duration, etc.) to specify the output format. Whereas the incoming stream data is a just a plain string. Before that could be passed to the logging system, we would need to find a good way to split that back into artist, title etc. Not so easy in the general case.