If youβve ever looked into a Xiaomi TV service menu or tried to understand smartphone logs through ADB, youβve probably come across the term βlog level,β which appears in the developerβs settings, debugging menus, or when working with firmware, but not all users understand why itβs needed and how it affects the device.
In fact, the log layer is a key parameter that determines the detail of entries in system logs, which helps engineers and advanced users track errors, analyze software performance, and even troubleshoot without contacting the service. However, improperly configuring this parameter can lead to memory overload, system slowdown, or even loss of important diagnostic data in critical crashes.
In this article, we will discuss in detail:
- π What is the magazine level and how it works in the Xiaomi ecosystem (TVs, smartphones, routers).
- βοΈ Where is the setting and how to change it without risk to the device.
- β οΈ What levels of logging exist and when to use.
- π οΈ Practical examples: how log files help diagnose problems.
What is the log level in Xiaomi devices
Log level is a parameter that determines the degree of detail of entries in system logs. Logs are files where a device records information about its work, from basic events (for example, on / off) to detailed error reports in applications or drivers.
In the Xiaomi ecosystem, the log level is regulated in several types of devices:
- πΊ Televisions (Mi series) TV, Redmi Smart TV) β through a service menu or ADB.
- π± Smartphones - in the developer settings (Settings) β The phone. β Assembly number).
- πΆ Routers - in the web interface of the administrator.
By default, most Xiaomi devices use a medium logging layer (INFO or WARN) to avoid overloading memory. However, when diagnosing problems (such as interface freezes or Wi-Fi problems), you may need to increase the detail to DEBUG or VERBOSE.
β οΈ Attention: Long-term logging at the maximum level (VERBOSE) This mode can cause internal memory to fill up and slow down the device, and only use this mode for short-term diagnostics!
Where is the journal level setting
The location of the option depends on the type of device, and the following is a list of the most common ways:
| Type of device | The path to adjustment | Required rights |
|---|---|---|
| Xiaomi TVs (Mi TV, Redmi TV) | Settings β Device β About the device β Software version β Quickly press 5 times on the βSoftware versionβ β Developer β Log Level | No (Developer Mode activated) |
| Xiaomi smartphones (MIUI) | Settings β The phone. β Version. MIUI β 7 times press "Version" MIUI" β Additionally. β Journal level | No. |
| Xiaomi Routers (Mi Router) | Web interface (192.168.31.1) β Additional β System tools β Logs β Level of detail | Administrator |
| Smart speakers (Mi AI Speaker) | Only through the Mi Home App (Device Settings β Diagnostics section) | Xiaomi account is required |
On some devices (such as TVs older than 2020), the option may be hidden, in which case it can be activated via a mobile phone. ADB-team:
adb shell setprop persist.log.tag 7Where 7 is the DEBUG level (for more information about the level codes, see the next section).
Decoding of the journal levels: from VERBOSE to ASSERT
Android and Android TV systems (which underlie most Xiaomi devices) use a standard classification of logging levels, differing in importance and the amount of information recorded:
- π΄ ASSERT (7) - critical errors leading to emergency shutdown.
- π ERROR (6) β serious failures requiring intervention (e.g. application crashes).
- π‘ WARN (5) β Warnings about potential problems (e.g. low memory level).
- π’ INFO (4) - basic information about the operation of the system (standard default level).
- π΅ DEBUG (3) - debugging messages for developers.
- π£ VERBOSE (2) - maximum detail (includes all events, even minor ones).
In practice:
- π§ For normal use, a sufficient level of INFO or WARN.
- π For diagnosing problems (such as interface freezes or Wi-Fi problems) is suitable DEBUG.
- π οΈ For deep debugging (developers, service centers) β VERBOSE.
β οΈ Attention: Level VERBOSE It can generate gigabytes of logs per day, especially on TVs with constant activity (e.g. when watching a video game). IPTV). This leads to memory wear and slowdown.
What if the log level is reset after rebooting?
How to use the journal level to diagnose problems
Increasing log detail helps to identify the causes of many problems.
Example 1: Xiaomi TV is constantly rebooting
If your Mi TV spontaneously shuts down or restarts, follow the following steps:
- Set the log level on DEBUG (via the service menu or ADB).
- Replay the problem (for example, run the application after which the crash occurs).
- Export logs via ADB: adb pull /data/logs/
- Look for E/ (ERROR) or F/ (FATAL) error lines associated with the graphics driver or overheating.
Example 2: Wi-Fi problems on Xiaomi router
If the Mi Router loses connection or brakes:
- πΆ Go to the router web interface (192.168.31.1).
- π§ Enter the journal level DEBUG in the section System tools β Logs.
- π Restart the router and wait for the next crash.
- π Download the log file and check for errors related to wpa_supplicant or hostapd.
Include the maximum level of the journal (DEBUG/VERBOSE)
Replay the problem (launch the application, connect to Wi-Fi, etc.)
Export logs via ADB or web interface
Search for keywords: ERROR, FATAL, crash, timeout
Reset the journal level back to INFO post-diagnosis-->
Risks and Limitations of Changing the Level of the Journal
While increasing log detail is useful for diagnosis, it also carries risks:
- π Slowdown: Write a lot of data to logs, loads the processor and memory. TV A Series) this may lead to interface lags.
- πΎ Memory overload: On TVs with a small amount of internal memory (8-16 GB), logs can take several gigabytes in a week.
- π Leakage of confidential data: in the logs can be stored IP-Addresses, device names on the network, and even password fragments (for example, when connecting to Wi-Fi).
To minimize the risks:
- π Use the elevated log level only for the duration of diagnosis.
- ποΈ Regularly clean logs through ADB: adb shell logcat -c
- π If you transfer logs to a service center, delete personal information from them (you can use utilities like sed or grep).
π‘
Before sending your Xiaomi support logs, archive them with a password, which will protect your data from accidental access.
How to return standard log level settings
If you have changed the logging level and want to return everything βas it wasβ, follow the instructions:
πΊ For Xiaomi TVs:
π± For smartphones:
- Open the settings β About the phone β version of MIUI.
- Click on the MIUI version 7 times to activate the developer mode.
- Back to Settings β Additionally. β For developers.
- Find the Log Level option and install the INFO.
πΆ For routers:
β οΈ Note: Some firmware (e.g., Mi) TV Stick or outdated router models, log level reset is possible only through ADB Or a full reset. Before you do that, save important data!
π‘
If you change the log level, the first thing you do is you turn back the INFO setting and restart the device, and 90 percent of the time, that solves the problem.