add function in logcat