【Android 应用开发】Android开发 使用 adb logcat 显示 Android 日志_adb logcat -t v>-程序员宅基地

技术标签: # Android 应用开发  ubuntu  韩曙亮  Logcat  日志  Android  


作者 : 万境绝尘  转载请著名出处


eclipse 自带的 LogCat 工具太垃圾了, 开始用 adb logcat 在终端查看日志;


1. 解析 adb logcat 的帮助信息


在命令行中输入 adb logcat --help 命令, 就可以显示该命令的帮助信息;

octopus@octopus:~$ adb logcat --help
Usage: logcat [options] [filterspecs]
options include:
  -s              Set default filter to silent.
                  Like specifying filterspec '*:s'
  -f <filename>   Log to file. Default to stdout
  -r [<kbytes>]   Rotate log every kbytes. (16 if unspecified). Requires -f
  -n <count>      Sets max number of rotated logs to <count>, default 4
  -v <format>     Sets the log print format, where <format> is one of:

                  brief process tag thread raw time threadtime long

  -c              clear (flush) the entire log and exit
  -d              dump the log and then exit (don't block)
  -t <count>      print only the most recent <count> lines (implies -d)
  -g              get the size of the log's ring buffer and exit
  -b <buffer>     Request alternate ring buffer, 'main', 'system', 'radio'
                  or 'events'. Multiple -b parameters are allowed and the
                  results are interleaved. The default is -b main -b system.
  -B              output the log in binary
filterspecs are a series of 
  <tag>[:priority]

where <tag> is a log component tag (or * for all) and priority is:
  V    Verbose
  D    Debug
  I    Info
  W    Warn
  E    Error
  F    Fatal
  S    Silent (supress all output)

'*' means '*:d' and <tag> by itself means <tag>:v

If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'

If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"


adb logcat 命令格式 : adb logcat [选项] [过滤项], 其中 选项 和 过滤项 在 中括号 [] 中, 说明这是可选的;


(1) 选项解析


选项解析

-- "-s"选项 : 设置输出日志的标签, 只显示该标签的日志;

-- "-f"选项 : 将日志输出到文件, 默认输出到标准输出流中, -f 参数执行不成功;

-- "-r"选项 : 按照每千字节输出日志, 需要 -f 参数, 不过这个命令没有执行成功;

-- "-n"选项 : 设置日志输出的最大数目, 需要 -r 参数, 这个执行 感觉 跟 adb logcat 效果一样;

-- "-v"选项 : 设置日志的输出格式, 注意只能设置一项;

-- "-c"选项 : 清空所有的日志缓存信息;

-- "-d"选项 : 将缓存的日志输出到屏幕上, 并且不会阻塞;

-- "-t"选项 : 输出最近的几行日志, 输出完退出, 不阻塞;

-- "-g"选项 : 查看日志缓冲区信息;

-- "-b"选项 : 加载一个日志缓冲区, 默认是 main, 下面详解;

-- "-B"选项 : 以二进制形式输出日志;


.

输出指定标签内容

-- "-s"选项 : 设置默认的过滤器, 如 我们想要输出 "System.out" 标签的信息, 就可以使用 adb logcat -s System.out 命令;

octopus@octopus:~$ adb logcat -s System.out
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
I/System.out(22930): GSM -91
I/System.out(22930): SignalStrength issssssssss : -91
I/System.out(22930): GSM -91
I/System.out(22930): SignalStrength issssssssss : -91
I/System.out(22930): Supervisor Thread
I/System.out(22930): Got run mode

输出日志信息到文件

-- "-f"选项 : 该选向后面跟着输入日志的文件, 使用 adb logcat -f log 命令, 会出现错误, 这里我们不推荐使用该选项;

octopus@octopus:~$ adb logcat -f log
couldn't open output file: Read-only file system
-- ">"输出 : ">" 后面跟着要输出的日志文件, 可以将 logcat 日志输出到文件中, 使用 adb logcat > log 命令, 使用 more log 命令查看日志信息;

octopus@octopus:~$ adb logcat > log
^C
octopus@octopus:~$ more log
--------- beginning of /dev/log/system
V/ActivityManager(  500): We have pending thumbnails: null
V/ActivityManager(  500): getTasks: max=1, flags=0, receiver=null
V/ActivityManager(  500): com.android.settings/.Settings: task=TaskRecord{42392278 #448 A com.android.settings U 0}
V/ActivityManager(  500): We have pending thumbnails: null


指定 logcat 的日志输出格式

-- "-v"选项 : 使用 adb logcat -v time 命令, 可以啥看日志的输出时间;

-- "brief"格式 : 这是默认的日志格式 " 优先级 / 标签 (进程ID) : 日志信息 ", 使用 adb logcat -v prief 命令;

octopus@octopus:~$ adb logcat -v brief
--------- beginning of /dev/log/system
D/PowerManagerService(  500): handleSandman: canDream=true, mWakefulness=Awake
D/PowerManagerService(  500): releaseWakeLockInternal: lock=1101267696, flags=0x0
-- "process"格式 : " 优先级 (进程ID) : 日志信息 ", 使用 adb logcat -v process 命令;

octopus@octopus:~$ adb logcat -v process
--------- beginning of /dev/log/system
D(  500) MobileDataStateReceiver received: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED_MOBILE [wap]  (MobileDataStateTracker)
V(  500) Broadcast: Intent { act=android.intent.action.ANY_DATA_STATE_MOBILE flg=0x10 (has extras) } ordered=true userid=0  (ActivityManager)
D(  500) wap: Intent from SIM 0, current SIM 0, current DataState DISCONNECTED  (MobileDataStateTracker)
D(  500) wap: wap setting isAvailable to false  (MobileDataStateTracker)
D(  500) wap: Received state=DISCONNECTED, old=DISCONNECTED, reason=dataDetached  (MobileDataStateTracker)
D(  500) BDC-Calling finishReceiver: IIntentReceiver=41c46ba0  (ActivityThread)
-- "tag"格式 : " 优先级 / 标签 : 日志信息", 使用 adb logcat -v tag 命令;

octopus@octopus:~$ adb logcat -v tag
--------- beginning of /dev/log/system
I/PowerManagerService: setBrightness mButtonLight 0.
D/PowerManagerService: updateScreenStateLocked: mDisplayReady=true, newScreenState=2, mWakefulness=1, mWakeLockSummary=0x1, mUserActivitySummary=0x1, mBootCompleted=true
D/PowerManagerService: handleSandman: canDream=true, mWakefulness=Awake
-- "thread"格式 : " 优先级 ( 进程ID : 线程ID) 标签 : 日志内容 ", 使用 adb logcat -v tag 命令;

octopus@octopus:~$ adb logcat -v thread
--------- beginning of /dev/log/system
V(  500: 2141) getTasks: max=1, flags=0, receiver=null
V(  500: 2141) com.lewa.launcher/.Launcher: task=TaskRecord{41dccc20 #425 A com.lewa.launcher U 0}
V(  500: 2141) We have pending thumbnails: null
V(  500: 2140) getTasks: max=1, flags=0, receiver=null
-- "raw"格式 : 只输出日志信息, 不附加任何其他 信息, 如 优先级 标签等, 使用 adb logcat -v raw 命令;

octopus@octopus:~$ adb logcat -v raw
--------- beginning of /dev/log/system
notifications are enabled for com.kindroid.security
Assigned score=0 to Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])
Native set alarm :Alarm{41e1ca00 type 3 com.kindroid.security}
reset poweroff alarm none
-- "time"格式 : "日期 时间 优先级 / 标签 (进程ID) : 进程名称 : 日志信息 " , 使用 adb logcat -v time 命令;

octopus@octopus:~$ adb logcat -v time
--------- beginning of /dev/log/system
04-25 17:18:13.019 V/ActivityManager(  500): Broadcast sticky: Intent { act=android.intent.action.SIG_STR flg=0x10 (has extras) } ordered=false userid=-1
04-25 17:18:13.157 V/NotificationService(  500): enqueueNotificationInternal: pkg=com.kindroid.security id=1020 notification=Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])
04-25 17:18:13.158 V/NotificationService(  500): notifications are enabled for com.kindroid.security
04-25 17:18:13.158 V/NotificationService(  500): Assigned score=0 to Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])
04-25 17:18:13.555 V/ActivityManager(  500): getTasks: max=1, flags=0, receiver=null
-- "long"格式 : " [ 日期 时间 进程ID : 线程ID 优先级 / 标签] 日志信息 ", 输出以上提到的所有的头信息, 使用 adb logcat -v long 命令;

octopus@octopus:~$ adb logcat -v long
--------- beginning of /dev/log/system
[ 04-25 17:21:18.118   500:0x2fe V/ActivityManager ]
We have pending thumbnails: null

[ 04-25 17:21:18.696   593:0x251 W/ActivityThread ]
Content provider com.android.providers.telephony.TelephonyProvider already published as telephony

[ 04-25 17:21:19.119   500:0x396 V/ActivityManager ]
getTasks: max=1, flags=0, receiver=null


清空日志缓存信息 : 使用 adb logcat -c 命令, 可以将之前的日志信息清空, 重新开始输出日志信息;


将缓存日志输出 : 使用 adb logcat -d 命令, 输出命令, 之后推出命令, 不会进行阻塞;


输出最近的日志 : 使用 adb logcat -t 5 命令, 可以输出最近的5行日志, 并且不会阻塞;

octopus@octopus:~$ adb logcat -t 5
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
W/ADB_SERVICES(10028): adb: unable to open /proc/10028/oom_adj
D/dalvikvm(23292): threadid=11: created from interp
D/dalvikvm(23292): start new thread
D/dalvikvm(23292): threadid=11: notify debugger
D/dalvikvm(23292): threadid=11 (Thread-24538): calling run()
octopus@octopus:~$ 

查看日志缓冲区信息 : 使用 adb logcat -g 命令;

octopus@octopus:~$ adb logcat -g
/dev/log/main: ring buffer is 256Kb (255Kb consumed), max entry is 5120b, max payload is 4076b
/dev/log/system: ring buffer is 256Kb (255Kb consumed), max entry is 5120b, max payload is 4076b
octopus@octopus:~$ 

加载日志缓冲区 : 使用 adb logcat -b 缓冲区类型 命令;

-- Android中的日志缓冲区 : system缓冲区 - 与系统相关的日志信息, radio缓冲区 - 广播电话相关的日志信息, events缓冲区 - 事件相关的日志信息, main缓冲区 - 默认的缓冲区;

octopus@octopus:~$ adb logcat -b radio -t 5
D/PHONE   (23599): [GeminiDataSubUtil] UAPP_C6-4
D/GSM     (23599): [GDCT][simId1]apnType = default
D/GSM     (23599): [GDCT][simId1]isDataAllowed: not allowed due to - gprs= 1 - SIM not loaded - desiredPowerState= false
D/GSM     (23599): [GDCT][simId1]isDataPossible(default): possible=false isDataAllowed=false apnTypePossible=true apnContextisEnabled=true apnContextState()=IDLE
I/MUXD    (23591): [gsm0710muxd] 3426:main(): Frames received/dropped: 18242/0
octopus@octopus:~$ 
octopus@octopus:~$ adb logcat -b main -t 5
D/NotificationService(  500): notification.sound=null
D/NotificationService(  500): mDmLock=false
I/ATCIJ   (16576): Couldn't find 'atci-serv-fw' socket; retrying after timeout
W/ADB_SERVICES(  246): create_local_service_socket() name=shell:export ANDROID_LOG_TAGS="" ; exec logcat -b main -t 5
W/ADB_SERVICES(16815): adb: unable to open /proc/16815/oom_adj
octopus@octopus:~$ 
octopus@octopus:~$ adb logcat -b system -t 5
D/PowerManagerService(  500): updateScreenStateLocked: mDisplayReady=true, newScreenState=0, mWakefulness=0, mWakeLockSummary=0x1, mUserActivitySummary=0x0, mBootCompleted=true
D/PowerManagerService(  500): handleSandman: canDream=false, mWakefulness=Asleep
V/NotificationService(  500): enqueueNotificationInternal: pkg=com.kindroid.security id=1020 notification=Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])
V/NotificationService(  500): notifications are enabled for com.kindroid.security
V/NotificationService(  500): Assigned score=0 to Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])
octopus@octopus:~$ 
octopus@octopus:~$ adb logcat -b event -t 5
Unable to open log device '/dev/log/event': No such file or directory
octopus@octopus:~$ adb logcat -b events -t 5
I/notification_cancel(  500): [com.kindroid.security,1026,NULL,0,0,64]
I/notification_enqueue(  500): [com.kindroid.security,1020,NULL,0,Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])]
I/notification_cancel(  500): [com.kindroid.security,1026,NULL,0,0,64]
I/notification_enqueue(  500): [com.kindroid.security,1020,NULL,0,Notification(pri=0 contentView=com.kindroid.security/0x7f030052 vibrate=null sound=null defaults=0x0 flags=0x2 kind=[null])]
I/notification_cancel(  500): [com.kindroid.security,1026,NULL,0,0,64]
octopus@octopus:~$ 

以二进制形式输出日志 : 使用 adb logcat -B 命令;

octopus@octopus:~$ adb logcat -B  -t 5
O��_�3ZS�4gps_mt3326nmea_reader_parse: line = 1218GPS get accuracy failed, fix mode:1
^��_�3ZS�=gps_mt3326nmea_reader_addc: line = 1331the structure include nmea_cb address is 0x658cc8e8
H��_�3ZSEGEgps_mt3326nmea_reader_addc: line = 1332nmea_cb address is 0x5d2fe279
i���3ZS�)>ADB_SERVICEScreate_local_service_socket() name=shell:export ANDROID_LOG_TAGS="" ; exec logcat -B -t 5
7*E*E�3ZSo�YADB_SERVICESadb: unable to open /proc/17706/oom_adj


(2) 过滤项解析


过滤项格式 : <tag>[:priority] , 标签:日志等级, 默认的日志过滤项是 " *:I " ;

-- V : Verbose (明细);

-- D : Debug (调试);

-- I : Info (信息);

-- W : Warn (警告);

-- E : Error (错误);

-- F : Fatal (严重错误);

-- S : Silent(Super all output) (最高的优先级, 可能不会记载东西);


过滤指定等级日志 : 使用 adb logcat 10 *:E 命令, 显示 Error 以上级别的日志;

octopus@octopus:~$ adb logcat *:E

Note: log switch off, only log_main and log_events will have logs!
--------- beginning of /dev/log/main
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/dalvikvm(  756): GC_CONCURRENT freed 1809K, 27% free 19489K/26695K, paused 16ms+5ms, total 109ms
E/WifiHW  (  441): wifi_send_command : SCAN ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/dalvikvm(  756): GC_CONCURRENT freed 1820K, 27% free 19490K/26695K, paused 16ms+3ms, total 102ms
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;


过滤指定标签等级日志 : 使用 adb logcat WifiHW:D *:S 命令进行过滤;

-- 命令含义 : 输出10条日志, 日志是 标签为 WifiHW, 并且优先级 Debug(调试) 等级以上的级别的日志;

-- 注意 *:S : 如果没有 *S 就会输出错误;

octopus@octopus:~$ adb logcat WifiHW:D *:S

Note: log switch off, only log_main and log_events will have logs!
--------- beginning of /dev/log/main
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;



可以同时设置多个过滤器 : 使用 adb logcat WifiHW:D dalvikvm:I *:S 命令, 输出 WifiHW 标签 的 Debug 以上级别 和 dalvikvm 标签的 Info 以上级别的日志;

octopus@octopus:~$ adb logcat WifiHW:D dalvikvm:I *:S 

Note: log switch off, only log_main and log_events will have logs!
--------- beginning of /dev/log/main
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/dalvikvm(  756): GC_CONCURRENT freed 1820K, 27% free 19490K/26695K, paused 17ms+2ms, total 110ms
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/dalvikvm(  756): GC_CONCURRENT freed 1810K, 27% free 19489K/26695K, paused 17ms+5ms, total 108ms
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;


2. 使用管道过滤日志


(1) 过滤固定字符串


过滤固定字符串 : 只要命令行出现的日志都可以过滤, 不管是不是标签;

-- 命令adb logcat | grep Wifi ;

octopus@octopus:~$ adb logcat | grep Wifi
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;
E/WifiHW  (  441): wifi_send_command : AP_SCAN 1 ; interface index=0;
E/WifiHW  (  441): wifi_send_command : SCAN_RESULTS ; interface index=0;


过滤字符串忽略大小写adb logcat | grep -i wifi ;




(2) 使用正则表达式匹配


分析日志 : 该日志开头两个字符是 "V/", 后面开始就是标签, 写一个正则表达式 "^..ActivityManager", 就可以匹配日志中的 "V/ActivityManager" 字符串;

V/ActivityManager(  574): getTasks: max=1, flags=0, receiver=null


正则表达式过滤日志 : 使用上面的正则表达式组成命令 adb logcat | grep "^..Activity" ;



作者 : 万境绝尘  转载请著名出处

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/han1202012/article/details/24425679

智能推荐

中文人名自动识别的一种有效方法_有什么方法自动识别人的中文姓名至英文,并且颠倒姓和名-程序员宅基地

文章浏览阅读1.5k次。http://blog.likeshow.net/uploads/200708/09_101105_.pdf _有什么方法自动识别人的中文姓名至英文,并且颠倒姓和名

浙江大学机器学习第二章人工神经网络_人工神经网络的mp模型-程序员宅基地

文章浏览阅读329次。人工神经网络人工神经网络发展史模型理解MP模型模型结构模型数学理解hopfield神经网络脉冲神经网络感知器算法训练样本向量化表达向量化的感知器算法感知器算法的收敛定理感知器的收敛定理证明人工神经网络发展史模型理解最简单是从MP模型开始,模型理解MP模型模型结构mp模型是指有一串输入,经过神经元加权求和,然后通过激活函数得到最终的输出结果y。模型数学理解从模型结构来看,输出的结果y可以数学表达式如下:y=sigmod(f(x))=sigmod(w∗x+b)y=sigmod(f(x))=_人工神经网络的mp模型

Hive on Spark源码分析(五)—— RemoteDriver_spark remotedriver: received job request-程序员宅基地

文章浏览阅读4k次,点赞2次,收藏5次。RemoteDriver与SparkClient进行任务交互,并向Spark集群提交任务的。SparkClientImpl中通过调用RemoteDriver.main在新进程中启动了RemoteDrivermain函数public static void main(String[] args) throws Exception { new RemoteDriver(a_spark remotedriver: received job request

IDEA设置窗口标签换行显示_idea 页签换行-程序员宅基地

文章浏览阅读7.9k次。windows -> editor tabs -> tabs placement 关掉 show tabs in sigle row即可_idea 页签换行

形函数的构造原理-有限元形函数的几个种类-程序员宅基地

文章浏览阅读1.6w次,点赞18次,收藏78次。在有限元法中,形函数是一个十分重要的概念。它不仅可以用做单元的内插函数,把单元内任一点的位移用节点位移表示,而且可作为加权余量法中的加权函数,可以处理外载荷,将分布力等效为节点上的集中力和力矩,此外,它还可用于后续的等参数单元的坐标变换等。1形函数的构造原理单元形函数主要取决于单元的形状、节点类型和单元的节点数目。节点的类型可以是只包含场函数的节点值,也可能还包含场函数导数的节点值。是否需要场..._形函数

脚本01-解除cpu占用高的进程_解决cpu归位脚本-程序员宅基地

文章浏览阅读333次。这段代码就是自动kill cpu占用超过75%的程序。把它放进一个xx.sh脚本,然后chmod 777增加执行权限#!/bin/bash/bin/ps axf -o “pid %cpu” | awk ‘{if($2>=75.0) print $1}’ | while read prociddokill -9 $prociddone..._解决cpu归位脚本

随便推点

mac上安装xcode老版本_xcode老版本安装-程序员宅基地

文章浏览阅读2k次。有的mac版本低无法安装最新版Xcode,此介绍安装老版Xcode1.首先打开连接 https://developer.apple.com/download/more/ 进入页面2.在搜索框中输入 xcode 回车搜索,如下图所示:3.等待下载安装..._xcode老版本安装

山东春考计算机本科学校分数线,2016年山东春季高考各校计算机专业录取分数线分别是多少?...-程序员宅基地

文章浏览阅读1.4k次。2016年山东春季高考各校计算机专业录取分数线分别是多少?以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!2016年山东春季高考各校计算机专业录取分数线分别是多少?2016年山东春季高考各校计算机专业录取分数线分别是多少?1、2016年全国各省份高考成绩及各批次控制分数线公布时间都集中在6月23-26日之间,预测的分数线..._山东滨州学院计算机专业春考本科分数线

Asp.net 2.0自定义控件(点击HyperLink后执行事件)[网友问题: DataList里HyperLink控件激发事件,在哪定义?]...-程序员宅基地

文章浏览阅读151次。(一). 概述HyperLink默认没有Click事件, 重写了一个HyperLink自定义控件. 实现原理: 默认Hyperlink是跳到点击请求的页面, 本HyperLink自定义控件最终也是跳转到请求的页面, 但期间执行了自己的一个方法, 我们可以在此方法中添写自己所需的功能. 本示例演示统计此超链接点击次数功能. [参考Asp.net 2.0高级编程](二). 代..._hyperlink控件后台点击方法

HBASE 启动报错 Can't get connection to ZooKeeper: KeeperErrorCode = ConnectionLoss for /hbase-程序员宅基地

文章浏览阅读9k次,点赞3次,收藏6次。查看防火墙状态$ service iptables status关闭防火墙$ service iptables stop查看防火墙状态$ service iptables status停止hbase$ stop-hbase.sh启动hbase$ start-hbase.sh_can't get connection to zookeeper: keepererrorcode = connectionloss for /hba

华为智慧屏鸿蒙系统手工升级,华为的“中场战事”:升级智能家居、推鸿蒙智慧屏,重构IoT赛道?...-程序员宅基地

文章浏览阅读324次。进一步切入全屋智能、大屏、车机等全场景。2020年,华为消费者业务的产品线纵深正进一步拓展。12月21日,华为面向家庭、出行场景正式发布了三大系列产品。其一是华为智能家居战略及全屋智能解决方案,顾名思义,是提升家居生活智能化的软硬件体系;其二是华为智慧屏S系列,搭载了鸿蒙OS最新版本,该系列是华为智慧屏家族的新成员,产品定位中低端市场,拥有55、65、75寸三种屏幕尺寸共6款机型;其三是车载智慧屏...

CMenu类中禁用/变灰某一项-程序员宅基地

文章浏览阅读322次。CMenu::EnableMenuItem启用、 禁用,或变暗的菜单项。UINT EnableMenuItem(UINT nIDEnableItem, UINT nEnable);参数nIDEnableItem根据所指定的菜单项,若要启用,nEnable。 弹出菜单项,以及标准菜单项,可以指定此参数。nEnable指定要执行的操作。 它可以是组合的M..._cmenu 菜单项置灰

推荐文章

热门文章

相关标签