Here is a sample that will do what you need using named pipes:
source s_pipe { pipe("/var/run/logpipe");};
destination d_messages { file("/var/log/pipelogs");};
log {source(s_pipe); destination(d_messages);};
Have your script direct it's output to /var/run/logpipe and they should show up in /var/log/pipelogs. Once the logs are getting in to syslog-ng, you can filter them, send them to different destinations, etc.