TwitterLogListener

37 views
Skip to first unread message

David Bergert

unread,
Jan 5, 2009, 4:16:48 PM1/5/09
to jpos-...@googlegroups.com

Hi:

 

I created a TwitterLogListener that is based on the SysLogListener, with the idea that you can log events or messages to a twitter account. It requires the jtwitter.jar :  from http://www.winterwell.com/software/jtwitter.php I've uploaded the file here:   http://groups-beta.google.com/group/jpos-users/files and have attached to this email as well.

 

To test:

 

add a TwitterLogListener:

 

  <log-listener class="org.jpos.util.TwitterLogListener">

      <property name="twitterUsername" value="paymentsystems" />

      <property name="twitterPassword" value="SuperSecretPassword" />

      <property name="tags" value="twitter" />

      <property name="prefix" value="[jPOS]"/>

   </log-listener>

 

run a little test script - 99_testTweets.xml in deploy

 

<script name="test" logger="Q2">

    import org.jpos.util.*;

        for (int i=0; qbean.running(); i++) {

             LogEvent evt = log.createLogEvent ("twitter");

             evt.addMessage ("This is a Twitter message test from jPOS! " + i);

             Logger.log (evt);

             Thread.sleep (10000L);

        }

</script>

 

Look at the messages in a twitter account:  http://twitter.com/paymentsystems  :)

 

Might have some interesting uses.

 

David Bergert, CISSP, CISA, CPISM/A

www.paymentsystemsblog.com

TwitterLogListener.java

Alejandro Revilla

unread,
Jan 5, 2009, 6:27:14 PM1/5/09
to jpos-...@googlegroups.com
Very nice! Just tested it and worked out of the box!

Now we could have it understand DMs and interface with the jPOS CLI :)

Imagine sending something like "D jpostwitteraccount sysmon"


chhil

unread,
Jan 5, 2009, 9:27:17 PM1/5/09
to jpos-...@googlegroups.com
Pretty neat... ;)

-chhil
Reply all
Reply to author
Forward
0 new messages