Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android AOSP linux service standard output

Im developing my own watchdog linux service (init.rc) for an android image Im cooking.

These linux services use some log libraries like log.h to show the output of such services. I have tried to track these libraries in order to find where that log output is dumped.

I havent found anything neither in the android logcat nor /proc/kmsg or dmesg

This is the log.h library for the linux services started in init.rc:

#ifndef _INIT_LOG_H_
#define _INIT_LOG_H_

#include <cutils/klog.h>

#define ERROR(x...)   KLOG_ERROR("init", x)
#define NOTICE(x...)  KLOG_NOTICE("init", x)
#define INFO(x...)    KLOG_INFO("init", x)

#define LOG_UEVENTS        0  /* log uevent messages if 1. verbose */

#endif

And this is an example of using such library

INFO("Starting watchdogd\n");
like image 231
Chus Muñoz Avatar asked May 09 '16 07:05

Chus Muñoz


1 Answers

to display log from your service in init.rc you can start your service with /system/bin/logwrapper example service xupnpdx /system/bin/logwrapper /system/bin/xupnpdservice

like image 144
vkumar Avatar answered Oct 06 '22 00:10

vkumar