Posts Tagged ‘TCPSyslogTarget’

Recently, I started developing application on Adobe Android AIR.
But I wonder how I can debug my application on Android Phone.

I searched it, but many solutions can’t fit my case.
My requirements are
1 ) No USB connection
2 ) No Android SDK on my PC.
3 ) Can support on production mode ( No debug player )

In other words, The limitations move to outer enviroment from app and android phone.
And I want to control the outer environment.

My solution


1 ) Need syslog server that can support TCP connetcion ( these are “rsyslog” or “syslog-ng” as I know )
2 ) TCPSyslogTarget as3 class ( can download on airxlib_log )
3 ) Wifi connection ( optional )
“optional” means .. I don’t think it is easy to make syslog server on the global network.

setup syslog server

The following config is a part of “rsyslog.conf”.

$InputTCPServerRun 514
$AllowedSender TCP,,
local1.*                                                /var/log/air.log
setup logging functions on your source code
import com.coltware.airxlib.log.TCPSyslogTarget;

//  my syslog server's ip is "". please change 

var syslog:TCPSyslogTarget = new TCPSyslogTarget("");
syslog.program = "AdobeAIR";
syslog.filters = ["*"];
syslog.level = LogEventLevel.DEBUG;
syslog.facility = TCPSyslogTarget.LOG_LOCAL1;
syslog.includeCategory = true;

use flex logging functions.

import mx.logging.ILogger;
import mx.logging.Log;

private static var log:ILogger = Log.getLogger("foofoo");

At first, I tried to use UDP connection. But I can’t. ( I don’t know the reason )

Add to Google
« 2月