You might also use the 'Global Logging' option in order to do so, which can be defined in the general setting, section 'Logging'.
This allows you to already define a global log file path and the 'format' for each log file line!
Simply adjust the 'Log File Entry' field with the relevant track macros you need to log to the file.
Make sure to place the ${CRLF} macro at the end to write a line-feed after each entry!
The existing field already contains a default string containing almost all relevant track macros - so just remove the ones you don't need.
In addition you might specify some options for the global logging:
Don't log if shorter: specify the minimum effective playtime for entries to be logged (0=log any)
Exclude: allows you to exclude certain media entry types from being logged
Expand: defines, if embedded containers should be expanded, so that their contained entries are logges as well
Keep: allows you to define the number of days after which old log files should be deleted
NOTE: Global log entries are NOT written automatically! They are ONLY written, with the related "EXEC_WRITE_GLOBAL_LOG" control-command!
This means you must call this control-command manually, i.e. with a global system event.
I'd recommend using either the "Playlist.OnTrackPlayed" or "Streaming.OnSongTitleChanged" event to do so (go to the general settings, section 'Events/Commands').
The control-command would then look like this:
<filename> : specify the filename (without any path) of the log file to use (e.g. use macros to define a dynamic name based on the actual date)
E.g. use:
Code: Select all
EXEC_WRITE_PLAYLIST_LOG ${yyyy}${MM}
to create a log file on a monthly bases (the extension .log is added automatically).
Or, you can configure these things yourself - again using a control-command.
E.g. you might use the global event "Playlist.OnTrackPlayed" or "Streaming.OnSongTitleChanged" (go to the general settings, section 'Events/Commands').
To these events you might assign the following control-command:
Code: Select all
EXEC_WRITE_FILE <filename>|<mode>|<content>
<filename> : specify the fully qualified filename (including the path) of the log file to use (e.g. use macros to define a dynamic name based on the actual date)
<mode> : 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
<content> : defines the actual text string to write/append to the file (e.g. use macros to define the dynamic content, like above!)
E.g. in your case I would use the following:
<filename> : C:\logs\${yyyy}${MM}.csv
<mode> : au
<content> : "${isrc}", "${trackname}", "${duration}", "${composer}", "${lyricist}", "${publisher}", "${producer}", "${year}", "${artist}"${CRLF}