Android Log Tag含義

来源:http://www.cnblogs.com/willhua/archive/2016/11/11/6054375.html
-Advertisement-
Play Games

在分析Android問題的時候重要的手段之一就是分析log,在events.log中有很多系統log,其中有些log的含義並不是很瞭解,下麵就是從安卓源碼中得到的系統log的tag。 關於Tag的說明如下:以 “30005 am_create_activity (User|1|5),(Token|1 ...


  在分析Android問題的時候重要的手段之一就是分析log,在events.log中有很多系統log,其中有些log的含義並不是很瞭解,下麵就是從安卓源碼中得到的系統log的tag。

  關於Tag的說明如下:以 “30005 am_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)” 為例,

  其中:

  • 30005 :相當於是am_create_activity這個tag的索引或者標識。不會出現在events.txt中。
  • am_create_activity:TAG名字
  • 後面用()括起來的相當於是這個log的一些信息,以(User|1|5)為例,User表示信息名字,User表示UID,1表示在列印出的log中該信息的數據類型,5表示該數據的單位。

  數據類型有:

  • 1:int
  • 2:long
  • 3:string
  • 4:list
  • 5:float

  數據的單位有:

  • 1:Number of objects
  • 2:Number of bytes
  • 3:Number of milliseconds
  • 4:Number of allocations
  • 5:Id
  • 6:Percent

  所以(User|1|5)表示的意思是:這項信息表示的是User,在Linux即相當於UID,信息的數據類型為1,即int,數據的單位為5,即Id。其他的類似。

  一個實際的log如下:

10-31 17:53:38.288 1232 2211 I am_create_activity: [0,208381599,127,cn.company.photoeditor/com.android.gallery3d.filtershow.FilterShowActivity,android.intent.action.EDIT,image/*,content://media/external/images/media/4427,1],表示的含義即為:

  • 這是一個表示activity創建的log
  • 程式的UID為0
  • 要創建的該activity的TOKEN為208381599
  • 該動作所處的Task ID為127
  • 所要創建的activity組件名為 cn.company.photoeditor/com.android.gallery3d.filtershow.FilterShowActivity
  • 創建該activity消息中的action為android.intent.action.EDIT,MIME TYPE為image/*,URI為content://media/external/images/media/4427,附帶的flag為1

下麵是源碼的中tag定義文件:

service/core/java/com/android/server/am/EventLogTags.logtags:

# See system/core/logcat/event.logtags for a description of the format of this file.
option java_package com.android.server.am
2719 configuration_changed (config mask|1|5)
2721 cpu (total|1|6),(user|1|6),(system|1|6),(iowait|1|6),(irq|1|6),(softirq|1|6)
# ActivityManagerService.systemReady() starts:
3040 boot_progress_ams_ready (time|2|3)
# ActivityManagerService calls enableScreenAfterBoot():
3050 boot_progress_enable_screen (time|2|3)
# Do not change these names without updating the checkin_events setting in
# google3/googledata/wireless/android/provisioning/gservices.config !!
#
# An activity is being finished:
30001 am_finish_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
# A task is being brought to the front of the screen:
30002 am_task_to_front (User|1|5),(Task|1|5)
# An existing activity is being given a new intent:
30003 am_new_intent (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
# A new task is being created:
30004 am_create_task (User|1|5),(Task ID|1|5)
# A new activity is being created in an existing task:
30005 am_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
# An activity has been resumed into the foreground but was not already running:
30006 am_restart_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# An activity has been resumed and is now in the foreground:
30007 am_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# Application Not Responding
30008 am_anr (User|1|5),(pid|1|5),(Package Name|3),(Flags|1|5),(reason|3)
# Activity launch time
30009 am_activity_launch_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3)
# Application process bound to work
30010 am_proc_bound (User|1|5),(PID|1|5),(Process Name|3)
# Application process died
30011 am_proc_died (User|1|5),(PID|1|5),(Process Name|3)
# The Activity Manager failed to pause the given activity.
30012 am_failed_to_pause (User|1|5),(Token|1|5),(Wanting to pause|3),(Currently pausing|3)
# Attempting to pause the current activity
30013 am_pause_activity (User|1|5),(Token|1|5),(Component Name|3)
# Application process has been started
30014 am_proc_start (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3),(Type|3),(Component|3)
# An application process has been marked as bad
30015 am_proc_bad (User|1|5),(UID|1|5),(Process Name|3)
# An application process that was bad is now marked as good
30016 am_proc_good (User|1|5),(UID|1|5),(Process Name|3)
# Reporting to applications that memory is low
30017 am_low_memory (Num Processes|1|1)
# An activity is being destroyed:
30018 am_destroy_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
# An activity has been relaunched, resumed, and is now in the foreground:
30019 am_relaunch_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# An activity has been relaunched:
30020 am_relaunch_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3)
# The activity's onPause has been called.
30021 am_on_paused_called (User|1|5),(Component Name|3),(Reason|3)
# The activity's onResume has been called.
30022 am_on_resume_called (User|1|5),(Component Name|3),(Reason|3)
# Kill a process to reclaim memory.
30023 am_kill (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(Reason|3)
# Discard an undelivered serialized broadcast (timeout/ANR/crash)
30024 am_broadcast_discard_filter (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(BroadcastFilter|1|5)
30025 am_broadcast_discard_app (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(App|3)
# A service is being created
30030 am_create_service (User|1|5),(Service Record|1|5),(Name|3),(UID|1|5),(PID|1|5)
# A service is being destroyed
30031 am_destroy_service (User|1|5),(Service Record|1|5),(PID|1|5)
# A process has crashed too many times, it is being cleared
30032 am_process_crashed_too_much (User|1|5),(Name|3),(PID|1|5)
# An unknown process is trying to attach to the activity manager
30033 am_drop_process (PID|1|5)
# A service has crashed too many times, it is being stopped
30034 am_service_crashed_too_much (User|1|5),(Crash Count|1|1),(Component Name|3),(PID|1|5)
# A service is going to be restarted after its process went away
30035 am_schedule_service_restart (User|1|5),(Component Name|3),(Time|2|3)
# A client was waiting for a content provider, but its process was lost
30036 am_provider_lost_process (User|1|5),(Package Name|3),(UID|1|5),(Name|3)
# The activity manager gave up on a new process taking too long to start
30037 am_process_start_timeout (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3)
# Unhandled exception
30039 am_crash (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Exception|3),(Message|3),(File|3),(Line|1|5)
# Log.wtf() called
30040 am_wtf (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Tag|3),(Message|3)
# User switched
30041 am_switch_user (id|1|5)
# Activity fully drawn time
30042 am_activity_fully_drawn_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3)
# Activity focused
30043 am_focused_activity (User|1|5),(Component Name|3),(Reason|3)
# Stack focus
30044 am_focused_stack (User|1|5),(Focused Stack Id|1|5),(Last Focused Stack Id|1|5),(Reason|3)
# Running pre boot receiver
30045 am_pre_boot (User|1|5),(Package|3)
# Report collection of global memory state
30046 am_meminfo (Cached|2|2),(Free|2|2),(Zram|2|2),(Kernel|2|2),(Native|2|2)
# Report collection of memory used by a process
30047 am_pss (Pid|1|5),(UID|1|5),(Process Name|3),(Pss|2|2),(Uss|2|2),(SwapPss|2|2)
# Attempting to stop an activity
30048 am_stop_activity (User|1|5),(Token|1|5),(Component Name|3)
# The activity's onStop has been called.
30049 am_on_stop_called (User|1|5),(Component Name|3),(Reason|3)
# Report changing memory conditions (Values are ProcessStats.ADJ_MEM_FACTOR* constants)
30050 am_mem_factor (Current|1|5),(Previous|1|5)

  services/core/java/com/android/server/EventLogTags.logtags:

# See system/core/logcat/event.logtags for a description of the format of this file.
option java_package com.android.server
# ---------------------------
# BatteryService.java
# ---------------------------
2722 battery_level (level|1|6),(voltage|1|1),(temperature|1|1)
2723 battery_status (status|1|5),(health|1|5),(present|1|5),(plugged|1|5),(technology|3)
# This is logged when battery goes from discharging to charging.
# It lets us count the total amount of time between charges and the discharge level
2730 battery_discharge (duration|2|3),(minLevel|1|6),(maxLevel|1|6)
# ---------------------------
# PowerManagerService.java
# ---------------------------
# This is logged when the device is being forced to sleep (typically by
# the user pressing the power button).
2724 power_sleep_requested (wakeLocksCleared|1|1)
# This is logged when the screen on broadcast has completed
2725 power_screen_broadcast_send (wakelockCount|1|1)
# This is logged when the screen broadcast has completed
2726 power_screen_broadcast_done (on|1|5),(broadcastDuration|2|3),(wakelockCount|1|1)
# This is logged when the screen on broadcast has completed
2727 power_screen_broadcast_stop (which|1|5),(wakelockCount|1|1)
# This is logged when the screen is turned on or off.
2728 power_screen_state (offOrOn|1|5),(becauseOfUser|1|5),(totalTouchDownTime|2|3),(touchCycles|1|1)
# This is logged when the partial wake lock (keeping the device awake
# regardless of whether the screen is off) is acquired or released.
2729 power_partial_wake_state (releasedorAcquired|1|5),(tag|3)
# The device is being asked to go into a soft sleep (typically by the ungaze gesture).
# It logs the time remaining before the device would've normally gone to sleep without the request.
2731 power_soft_sleep_requested (savedwaketimems|2)
#
# Leave IDs through 2739 for more power logs (2730 used by battery_discharge above)
#
# ---------------------------
# DeviceStorageMonitorService.java
# ---------------------------
# The disk space free on the /data partition, in bytes
2744 free_storage_changed (data|2|2)
# Device low memory notification and disk space free on the /data partition, in bytes at that time
2745 low_storage (data|2|2)
# disk space free on the /data, /system, and /cache partitions in bytes
2746 free_storage_left (data|2|2),(system|2|2),(cache|2|2)
# file on cache partition was deleted
2748 cache_file_deleted (path|3)
# ---------------------------
# NotificationManagerService.java
# ---------------------------
# when a NotificationManager.notify is called. status: 0=post, 1=update, 2=ignored
2750 notification_enqueue (uid|1|5),(pid|1|5),(pkg|3),(id|1|5),(tag|3),(userid|1|5),(notification|3),(status|1)
# when someone tries to cancel a notification, the notification manager sometimes
# calls this with flags too
2751 notification_cancel (uid|1|5),(pid|1|5),(pkg|3),(id|1|5),(tag|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
# when someone tries to cancel all of the notifications for a particular package
2752 notification_cancel_all (uid|1|5),(pid|1|5),(pkg|3),(userid|1|5),(required_flags|1),(forbidden_flags|1),(reason|1|5),(listener|3)
# when the notification panel is shown
# Note: New tag range starts here since 2753+ have been used below.
27500 notification_panel_revealed (items|1)
# when the notification panel is hidden
27501 notification_panel_hidden
# when notifications are newly displayed on screen, or disappear from screen
27510 notification_visibility_changed (newlyVisibleKeys|3),(noLongerVisibleKeys|3)
# when notifications are expanded, or contracted
27511 notification_expansion (key|3),(user_action|1),(expanded|1),(lifespan|1),(freshness|1),(exposure|1)
# when a notification has been clicked
27520 notification_clicked (key|3),(lifespan|1),(freshness|1),(exposure|1)
# when a notification action button has been clicked
27521 notification_action_clicked (key|3),(action_index|1),(lifespan|1),(freshness|1),(exposure|1)
# when a notification has been canceled
27530 notification_canceled (key|3),(reason|1),(lifespan|1),(freshness|1),(exposure|1)
# replaces 27510 with a row per notification
27531 notification_visibility (key|3),(visibile|1),(lifespan|1),(freshness|1),(exposure|1),(rank|1)
# a notification emited noise, vibration, or light
27532 notification_alert (key|3),(buzz|1),(beep|1),(blink|1)
# a notification was added to a autogroup
27533 notification_autogrouped (key|3)
# notification was removed from an autogroup
275534 notification_unautogrouped (key|3)
# ---------------------------
# Watchdog.java
# ---------------------------
2802 watchdog (Service|3)
2803 watchdog_proc_pss (Process|3),(Pid|1|5),(Pss|1|2)
2804 watchdog_soft_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2),(Skip|3)
2805 watchdog_hard_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2)
2806 watchdog_pss_stats (EmptyPss|1|2),(EmptyCount|1|1),(BackgroundPss|1|2),(BackgroundCount|1|1),(ServicePss|1|2),(ServiceCount|1|1),(VisiblePss|1|2),(VisibleCount|1|1),(ForegroundPss|1|2),(ForegroundCount|1|1),(NoPssCount|1|1)
2807 watchdog_proc_stats (DeathsInOne|1|1),(DeathsInTwo|1|1),(DeathsInThree|1|1),(DeathsInFour|1|1),(DeathsInFive|1|1)
2808 watchdog_scheduled_reboot (Now|2|1),(Interval|1|3),(StartTime|1|3),(Window|1|3),(Skip|3)
2809 watchdog_meminfo (MemFree|1|2),(Buffers|1|2),(Cached|1|2),(Active|1|2),(Inactive|1|2),(AnonPages|1|2),(Mapped|1|2),(Slab|1|2),(SReclaimable|1|2),(SUnreclaim|1|2),(PageTables|1|2)
2810 watchdog_vmstat (runtime|2|3),(pgfree|1|1),(pgactivate|1|1),(pgdeactivate|1|1),(pgfault|1|1),(pgmajfault|1|1)
2811 watchdog_requested_reboot (NoWait|1|1),(ScheduleInterval|1|3),(RecheckInterval|1|3),(StartTime|1|3),(Window|1|3),(MinScreenOff|1|3),(MinNextAlarm|1|3)
# ---------------------------
# BackupManagerService.java
# ---------------------------
2820 backup_data_changed (Package|3)
2821 backup_start (Transport|3)
2822 backup_transport_failure (Package|3)
2823 backup_agent_failure (Package|3),(Message|3)
2824 backup_package (Package|3),(Size|1|2)
2825 backup_success (Packages|1|1),(Time|1|3)
2826 backup_reset (Transport|3)
2827 backup_initialize
2828 backup_requested (Total|1|1),(Key-Value|1|1),(Full|1|1)
2829 backup_quota_exceeded (Package|3)
2830 restore_start (Transport|3),(Source|2|5)
2831 restore_transport_failure
2832 restore_agent_failure (Package|3),(Message|3)
2833 restore_package (Package|3),(Size|1|2)
2834 restore_success (Packages|1|1),(Time|1|3)
2840 full_backup_package (Package|3)
2841 full_backup_agent_failure (Package|3),(Message|3)
2842 full_backup_transport_failure
2843 full_backup_success (Package|3)
2844 full_restore_package (Package|3)
2845 full_backup_quota_exceeded (Package|3)
2850 backup_transport_lifecycle (Transport|3),(Bound|1|1)
# ---------------------------
# SystemServer.java
# ---------------------------
# SystemServer.run() starts:
3010 boot_progress_system_run (time|2|3)
# ---------------------------
# PackageManagerService.java
# ---------------------------
# Package Manager starts:
3060 boot_progress_pms_start (time|2|3)
# Package Manager .apk scan starts:
3070 boot_progress_pms_system_scan_start (time|2|3)
# Package Manager .apk scan starts:
3080 boot_progress_pms_data_scan_start (time|2|3)
# Package Manager .apk scan ends:
3090 boot_progress_pms_scan_end (time|2|3)
# Package Manager ready:
3100 boot_progress_pms_ready (time|2|3)
# + check activity_launch_time for Home app
# Value of "unknown sources" setting at app install time
3110 unknown_sources_enabled (value|1)
# Package Manager critical info
3120 pm_critical_info (msg|3)
# ---------------------------
# WindowManagerService.java
# ---------------------------
# Out of memory for surfaces.
31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3)
# Task created.
31001 wm_task_created (TaskId|1|5),(StackId|1|5)
# Task moved to top (1) or bottom (0).
31002 wm_task_moved (TaskId|1|5),(ToTop|1),(Index|1)
# Task removed with source explanation.
31003 wm_task_removed (TaskId|1|5),(Reason|3)
# Stack created.
31004 wm_stack_created (StackId|1|5)
# Home stack moved to top (1) or bottom (0).
31005 wm_home_stack_moved (ToTop|1)
# Stack removed.
31006 wm_stack_removed (StackId|1|5)
# bootanim finished:
31007 wm_boot_animation_done (time|2|3)
# ---------------------------
# InputMethodManagerService.java
# ---------------------------
# Re-connecting to input method service because we haven't received its interface
32000 imf_force_reconnect_ime (IME|4),(Time Since Connect|2|3),(Showing|1|1)
# ---------------------------
# WallpaperManagerService.java
# ---------------------------
33000 wp_wallpaper_crashed (component|3)
# ---------------------------
# Device idle
# ---------------------------
34000 device_idle (state|1|5), (reason|3)
34001 device_idle_step
34002 device_idle_wake_from_idle (is_idle|1|5), (reason|3)
34003 device_idle_on_start
34004 device_idle_on_phase (what|3)
34005 device_idle_on_complete
34006 device_idle_off_start (reason|3)
34007 device_idle_off_phase (what|3)
34008 device_idle_off_complete
34009 device_idle_light (state|1|5), (reason|3)
34010 device_idle_light_step
# ---------------------------
# DisplayManagerService.java
# ---------------------------
# Auto-brightness adjustments by the user.
35000 auto_brightness_adj (old_adj|5),(old_lux|5),(old_brightness|5),(old_gamma|5),(new_adj|5),(new_lux|5),(new_brightness|5),(new_gamma|5)
# ---------------------------
# ConnectivityService.java
# ---------------------------
# Connectivity state changed
50020 connectivity_state_changed (type|1),(subtype|1),(state|1)
# ---------------------------
# NetworkStatsService.java
# ---------------------------
51100 netstats_mobile_sample (dev_rx_bytes|2|2),(dev_tx_bytes|2|2),(dev_rx_pkts|2|1),(dev_tx_pkts|2|1),(xt_rx_bytes|2|2),(xt_tx_bytes|2|2),(xt_rx_pkts|2|1),(xt_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1),(trusted_time|2|3)
51101 netstats_wifi_sample (dev_rx_bytes|2|2),(dev_tx_bytes|2|2),(dev_rx_pkts|2|1),(dev_tx_pkts|2|1),(xt_rx_bytes|2|2),(xt_tx_bytes|2|2),(xt_rx_pkts|2|1),(xt_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1),(trusted_time|2|3)
# ---------------------------
# LockdownVpnTracker.java
# ---------------------------
51200 lockdown_vpn_connecting (egress_net|1)
51201 lockdown_vpn_connected (egress_net|1)
51202 lockdown_vpn_error (egress_net|1)
# ---------------------------
# ConfigUpdateInstallReceiver.java
# ---------------------------
51300 config_install_failed (dir|3)
# ---------------------------
# IntentFirewall.java
# ---------------------------
51400 ifw_intent_matched (Intent Type|1|5),(Component Name|3),(Caller Uid|1|5),(Caller Pkg Count|1|1),(Caller Pkgs|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
# ---------------------------
# IdleMaintenanceService.java
# ---------------------------
51500 idle_maintenance_window_start (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batteryCharging|1|5)
51501 idle_maintenance_window_finish (time|2|3), (lastUserActivity|2|3), (batteryLevel|1|6), (batteryCharging|1|5)
# ---------------------------
# MountService.java
# ---------------------------
2755 fstrim_start (time|2|3)
2756 fstrim_finish (time|2|3)
# ---------------------------
# AudioService.java
# ---------------------------
40000 volume_changed (stream|1), (prev_level|1), (level|1), (max_level|1), (caller|3)
40001 stream_devices_changed (stream|1), (prev_devices|1), (devices|1)
# ---------------------------
# GestureLauncherService.java
# ---------------------------
40100 camera_gesture_triggered (gesture_on_time|2|3), (sensor1_on_time|2|3), (sensor2_on_time|2|3), (event_extra|1|1)

  


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 1、跨域請求: Cross Domain Request:跨功能變數名稱的HTTP請求,瀏覽器從某個功能變數名稱下的資源訪問了另一功能變數名稱下的另一資源(協議、功能變數名稱或是埠號不同); ①瀏覽器允許跨域請求的情形: <img>、<link>、<script>、<iframe> ②禁止跨域請求的情形: XHR——瀏覽器預設出 ...
  • 前言 DOM的作用是將網頁轉為一個javascript對象,從而可以使用javascript對網頁進行各種操作(比如增刪內容)。瀏覽器會根據DOM模型,將HTML文檔解析成一系列的節點,再由這些節點組成一個樹狀結構。DOM的最小組成單位叫做節點(node),文檔的樹形結構(DOM樹)由12種類型的節 ...
  • 簡介 沒有用過Node,記的這些只是學習的筆記,有什麼錯的地方,望各位前輩指正。 Node是一個伺服器端Javascript解釋器,依賴於Chrome v8引擎進行代碼編譯,事件驅動、非阻塞I/O都是他顯著的特點。 伺服器能夠處理的併發連接的最大數量是目前Web應用程式架構的瓶頸,Node的出現就打 ...
  • 一、項目概要 1.1 項目效果如圖: 1.2 需要使用到的技術 ViewDragHelper: 要實現和QQ5.0側滑的特效,需要藉助谷歌在2013年I/O大會上發佈的ViewDragHelper類,提供這個類目的就是為瞭解決拖拽滑動問題 1.3 側滑菜單的實現方式 1. SlidingMenu 第 ...
  • 什麼時候需要 Looper Looper用於封裝了android線程中的消息迴圈,預設情況下一個線程是不存在消息迴圈(message loop)的,需要調用Looper.prepare()來給線程創建一個消息迴圈,調用Looper.loop()來使消息迴圈起作用,使用Looper.prepare() ...
  • 下載地址與說明http://www.androiddevtools.cn/#sdk-list 手動添加 SDK 這是Android開發所需的sdk,下載並解壓後,將解壓出的整個文件夾複製或者移動到 your sdk 路徑/platforms文件夾,然後打開SDK Manager,打開 Tools(工 ...
  • Android Weekly筆記, 本期內容包括: Mockito的擴展; ConstraintLayout的鏈式約束; Kotlin的Async-Await; RxJava2.0; 屏幕旋轉導致的Activity重建; Throwable類的設計問題; Espresso測試中如何等待非同步請求返回;... ...
  • 最近比較關註微信小程式,而且微信小程式的後臺必須強制要求https, https相對http成本要高很多了。 這裡我感覺有2個商機 (1)提供https 中轉伺服器 ,按流量來收費 (2) 微信小程式https 雲後臺 對於很多人學習微信小程式的人來說,需要一個免費的後臺來配合,那麼就可以搞一個 微 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...