[mtasc] Don't know how to use TRACE

stuff at trackingsolutions.ca stuff at trackingsolutions.ca
Thu Sep 1 23:42:26 CEST 2005


Why not just use Flashout in Eclipse?

On September 1, 2005 03:39 pm, Austin Haas wrote:
> Here is a python script that will catch your custom traces. Your trace
> function should look something like this:
>
> static function myTrace(msg){
>
>    var s = new LoadVars();
>    var r = new LoadVars();
>
>    s.msg = msg;
>    s.sendAndLoad("http://localhost:8881",r,"POST");
> }
>
> # -----------------------------------------------------------------
>
> #!/usr/bin/python
>
> import BaseHTTPServer, cgi
>
> class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
>
>          server_version = "Debug_Eater/1.0"
>
>          def do_POST(self):
>                  ctype, pdict =
> cgi.parse_header(self.headers.getheader('content-type'))
>                  length = int(self.headers.getheader('content-length'))
>
>                  msgData = cgi.parse_qs(
> self.rfile.read(length),keep_blank_values='true' )
>
>                  # We expect messages to be sent with particular keys
>                  msg = msgData['msg'][0]
>                  print msg + "\n"
>
>                  self.send_response(200)
>
>
> srv = BaseHTTPServer.HTTPServer(('localhost',8881),MyHandler)
> srv.serve_forever()
>
> # ------------------------------------------------------------
>
> Run this script. It will listen on port 8881. You can then send it http
> messages using POST, and it will print them to the console.
>
> I haven't used this in a while, but I tested it, and it still works.
> I've moved on to using a socket server with the Twisted framework. A
> socket server will provide better performance than using an http request
> for every trace.
>
> -austin
>
> Mark Winterhalder wrote:
> > On 8/31/05, Karlisson M. Bezerra <karlissonbezerra at yahoo.com.br> wrote:
> >>How I do to get my logs traced? I use Linux, it will
> >>write information in the shell??? Can anyone help me?
> >>That's urgent!!!
> >
> > no, you can't trace to the shell. you need some means of output the
> > flashplayer can communicate with, e.g. another swf that displays it, a
> > socket server, or something like that.
> >
> > here are some, also in the "Debugging Tools" section right after it:
> > http://osflash.org/doku.php?id=open_source_flash_projects#logging_tools
> >
> > mark
>
> --
> MTASC : no more coffee break while compiling



More information about the mtasc mailing list