# Question about logging options in Android



## SkullOne (Jul 9, 2011)

Once again Greetings!

Aren't you guys getting sick of my questions yet?







Thanks for all the answer though. I'm learning a lot and having fun doing it!

I now need help in understanding how to go about getting a better iptables log. Currently the app uses dmesg to pull the information from the kernel, which isn't all that great.

You can see it here:

https://github.com/s...l/Api.java#L911

I'd much prefer a way to set all the iptables logs to it's own file like you can in Linux using syslog.conf and just dump all iptables information to it's own file. Is it possible to do the same in Android? Google didn't yield much for me for this specific type of logging. Everything pointed back to Logcat or Log.

Thanks!

-Jason


----------



## yarly (Jun 22, 2011)

That would require a custom kernel. logcat is basically what takes the place of syslog for android.

http://forum.xda-developers.com/showthread.php?t=813340

you can do this though: http://balage.blogs.balabit.com/2010/11/logging-your-android-device-into-syslog-ng/


----------



## SkullOne (Jul 9, 2011)

yarly said:


> That would require a custom kernel. logcat is basically what takes the place of syslog for android.
> 
> http://forum.xda-dev...ad.php?t=813340
> 
> you can do this though: http://balage.blogs....into-syslog-ng/


That's what I was afraid you were going to say.

Could I actually dump the iptables log into Logcat and strip it out? Would there be any issues doing that (ie not recommended) if it is possible?


----------

