/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _ANDROID_LOG_H #define _ANDROID_LOG_H /****************************************************************** * * IMPORTANT NOTICE: * * This file is part of Android's set of stable system headers * exposed by the Android NDK (Native Development Kit) since * platform release 1.5 * * Third-party source AND binary code relies on the definitions * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES. * * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES) * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES */ /* * Support routines to send messages to the Android in-kernel log buffer, * which can later be accessed through the 'logcat' utility. * * Each log message must have * - a priority * - a log tag * - some text * * The tag normally corresponds to the component that emits the log message, * and should be reasonably small. * * Log message text may be truncated to less than an implementation-specific * limit (e.g. 1023 characters max). * * Note that a newline character ("\n") will be appended automatically to your * log message, if not already there. It is not possible to send several messages * and have them appear on a single line in logcat. * * PLEASE USE LOGS WITH MODERATION: * * - Sending log messages eats CPU and slow down your application and the * system. * * - The circular log buffer is pretty small (<64KB), sending many messages * might push off other important log messages from the rest of the system. * * - In release builds, only send log messages to account for exceptional * conditions. * * NOTE: These functions MUST be implemented by /system/lib/liblog.so */ #include <stdarg.h> #ifdef __cplusplus extern "C" { #endif /* * Android log priority values, in ascending priority order. */ typedef enum android_LogPriority { ANDROID_LOG_UNKNOWN = 0, ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */ ANDROID_LOG_VERBOSE, ANDROID_LOG_DEBUG, ANDROID_LOG_INFO, ANDROID_LOG_WARN, ANDROID_LOG_ERROR, ANDROID_LOG_FATAL, ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */ } android_LogPriority; /* * Send a simple string to the log. */ int __android_log_write(int prio, const char *tag, const char *text); /* * Send a formatted string to the log, used like printf(fmt,...) */ int __android_log_print(int prio, const char *tag, const char *fmt, ...) #if defined(__GNUC__) __attribute__ ((format(printf, 3, 4))) #endif ; /* * A variant of __android_log_print() that takes a va_list to list * additional parameters. */ int __android_log_vprint(int prio, const char *tag, const char *fmt, va_list ap); /* * Log an assertion failure and SIGTRAP the process to have a chance * to inspect it, if a debugger is attached. This uses the FATAL priority. */ void __android_log_assert(const char *cond, const char *tag, const char *fmt, ...) #if defined(__GNUC__) __attribute__ ((noreturn)) __attribute__ ((format(printf, 3, 4))) #endif ; #ifdef __cplusplus } #endif #endif /* _ANDROID_LOG_H */
相关推荐
Android源码,/platform/system/core/include/cutils/log.h
主要介绍了解决Android Studio Log.v和Log.d不显示的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Log.isLoggable的使用测试样例
[人才房产]无忧之源招聘系统及Log4Net源码_51hr.zip源码ASP.NET网站源码打包下载[人才房产]无忧之源招聘系统及Log4Net源码_51hr.zip源码ASP.NET网站源码打包下载[人才房产]无忧之源招聘系统及Log4Net源码_51hr.zip...
在Android群里,经常会有人问我,Android Log是怎么用的,今天我就把从网上以及SDK里东拼西凑过来,让大家先一睹为快,希望对大家入门Android Log有一定的帮助.android.util.Log常用的方法有以下5个:Log.v() Log....
Android显示Log信息(带行号),非常好用的Android工具类!
log4cpp-1.1.3.tar.gz源码和测试代码
android抓取所有日志命令(kernel,main,system......)
log4j-1.2.16.jar 源码包
C语言log等级打印,不同log等级打印信息不同颜色区别。便于开发中问题定位,log显示区别,清晰明了,一目了然
当Android代码java层发生崩溃的时候,会将崩溃信息收集起来
android.util.Log is the most usable library of the Android. But, when the app released on the market, some important information is clearly forgotten by the developer. All logs are disabled by Debug...
notepad++ 支持 android的adb插件版本32位的,直接在notepad内查看adb实时log。
log4net 源码
Android高级应用源码-android java 通用代码,关于用properties存储打印的Log.zip
高通8155p平台QNX+Android9开启ASAN定位内存问题方法。里面有所有的Android.mk与Android.bp示例。不会写Android.mk与Android.bp,或者常有编译问题的可以下载参考,解决无法使能ASAN的问题。不会用的一定要展开下面...
c语言写的读写文件操作,主要作用是是用于调试。。这是我用来在linux中调试记录信息用的,当然windows也可以使用,因此使用标准c因此任何平台的c都可以编译的,主要功能就是把某函数的地址记录下来,以便调试时候能...
Description: System.IO.Log.dll Version: 3.0.4506.30 Size: 131,072 字节) Directory: %programfiles%\Reference Assemblies\Microsoft\Framework\v3.0\System.IO.Log.DLL Operating System: Windows xp SP3
3.添加配置文件log.config; 4.添加按钮代码; private void button1_Click(object sender, EventArgs e) { log4net.Config.XmlConfigurator.Configure(new FileInfo("log.config")); Type type = MethodBase....