6

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");
Chus Muñoz
  • 120
  • 8

1 Answers1

6

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

vkumar
  • 169
  • 3