If youβve ever looked into the developer section on Xiaomi, Redmi or smartphones POCO, You might have noticed a mysterious parameter, the log level, which at first glance is a technical detail that doesn't affect your daily use of your phone. However, in practice, incorrect settings of this parameter can lead to accelerated wear of flash memory, slowing down the system or even problems with updates. MIUI.
In this article, we will go into detail what the term "log level" means, what it can take on Xiaomi devices, and why it's important not only for developers but also for ordinary users, how to check the current level, when it should be changed, and what risks are fraught with experimenting with this parameter, and at the end, answers to the most common questions and practical tips for optimizing your smartphone.
What is the Log Level on Xiaomi?
Log Level is a parameter that defines the detail of system logs that are written to the device's memory. Logs record operating system events, application performance, errors and debugging information. The higher the level, the more data is stored, from critical crashes to small things like clicking on a screen.
On Xiaomi smartphones, this option is available in Settings β The phone. β Version. MIUI (5 times tap to activate the developer mode, then in additional β For developers β Log Level: By default, it is set to Off or Errors, but may vary depending on the version. MIUI device models.
- π± What are logs for? They help diagnose problems, debug software, and analyze the system, for example, when you send an error report to Xiaomi, logs are automatically attached to the message.
- βοΈ Who's leveling? Usually it's done by application developers or deep diagnostic support engineers, but sometimes users turn on advanced logging without realizing the consequences.
- β οΈ What is dangerous about high levels? Constant log writing increases the load on the processor and reduces the life of flash memory (especially on budget models with eMMC).
It is important to understand that the level of the journal is not the same as debugging the USB It's a system parameter that affects the entire firmware. MIUI, It's not just individual functions, like even if you turn off logging, call data, and SMS It will still be saved in standard Android magazines.
What are the levels of the magazine on Xiaomi
In the firmware MIUI There are several log-level options available, each of which determines the amount and type of information stored. The following are standard values, which may vary slightly depending on the version of the system:
| Journal level | Description | System load | Recommendations for use |
|---|---|---|---|
| Off. | Logs are disabled (only critical events are recorded). | Minimum | It is optimal for everyday use. |
| Mistakes. | Only failures and critical errors are recorded. | Low. | It is suitable for most users. |
| Warnings | Warnings about potential problems are added. | Medium | It is useful for diagnosing unstable work. |
| Information | All events are recorded, including regular operations. | Tall. | Only for debugging applications. |
| Debugging | Maximum detail (including debugging messages). | Very high. | Use it for a short time! |
On some models (for example, Xiaomi 12 Pro or POCO F4) There may be an additional layer called Verbose, which records everything, including low-level kernel operations, which is used exclusively for deep diagnostics and can slow down the phone by 10-15%.
Fun fact: on devices with Qualcomm Snapdragon processors (for example, Redmi Note 11 Pro)+) when the Debugging level is enabled, additional logging of the module is activated QDSS (Qualcomm Diagnostic Service Suite, which is even more stressful.
β οΈ Note: If you notice that after changing the log level, the phone becomes faster to discharge or warm up, return the setting to Error or Off. UFS 2.1 and below).
How to check the current level of the journal
You can find out what level of log is activated on your Xiaomi in two ways: through the settings menu or using the Settings menu. ADB-The first method is simpler and more suitable for most users, the second one gives more information for experienced users.
Method 1: Through the MIUI settings
Sequence of action:
- Open the Settings. β The phone.
- Find the item Version. MIUI and tap it 5-7 times until you become a developer!.
- Return to the main settings menu and select Additional β For developers.
- Scroll down to the Debugging section and find the Log Level item.
If the item is missing, then your version MIUI It hides it by default, and then the second way will help.
Method 2: Through ADB (for Advanced)
Connect your phone to a computer with installed ADB-Drivers and execute the command:
adb shell getprop persist.logd.logpersistdIn response, you will get one of the following values:
- 0 - Logging is disabled;
- 1 - Error level;
- 2 - Warnings;
- 3 - Information;
- 4 - Debugging.
π‘
If the team is not working, try first to enable debugging by USB in the developer settings and confirm the connection on the phone.
When and why to change the level of the journal
In 90% of cases, you don't need to change the log level - standard settings (Errors or Off) are optimal for everyday use.
- π Diagnostics of failures: If the phone spontaneously restarts, apps fly out or artifacts appear on the screen, logs will help identify the cause. For example, when sending a report to Xiaomi support, it is recommended to include the Warning level or Information.
- π§ Application debugging. Developers often ask users to enable advanced logging to analyze bugs. In this case, the Debugging layer is used, but only for the duration of testing.
- π‘ Network problems: If Wi-Fi or mobile internet is unstable, the network stack logs (Information layer) can show where the connection breaks.
- π Firmware update: Manual firmware through Fastboot or Recovery sometimes requires logging to track the process (e.g., E:Footer is wrong).
However, there is a downside: constant logging at the Debugging level can:
- π Reduce system speed by 5-10% (due to constant data recording).
- π Increase battery consumption by 3β7% (due to processor activity and memory).
- πΎ Reduce flash memory life (especially on 5.1 eMMC devices where write cycles are limited).
β οΈ Note: Some models (e.g. Redmi) 9A or POCO M3) Debugging level can lead to automatic reset of network settings after rebooting.This is due to the peculiarities of the logd module in Android Go firmware.
It was used for diagnosis, but the problem is solved.|Noticed increased heat or battery discharge|Planning an update. MIUI|The phone stopped for no apparent reason.-->
How to change the level of the journal: step-by-step instructions
If you decide to change the level of the journal, follow this instruction.Remember: it is not recommended to leave a high level for a long time - use it only for specific tasks.
Step 1: Activate the Developer Mode
If you havenβt already turned on this mode, do the following:
- Go to Settings. β The phone.
- Find the version. MIUI And tap it 5-7 times until you get a message!.
- Return to the main settings menu β now there will be a paragraph for developers (usually in the section Additional).
Step 2: Find the log level setting
In the developer menu, scroll down to the Debugging section, where you will see Log Level (some firmware may call it Logistic or System Event Journal).
Step 3: Select the desired level
Slip on the item and select one of the values (see the table above for recommendations), for example, for diagnosing Wi-Fi problems, Information will do, and for sending an error report, Warnings.
Step 4: Reset the device
The changes will only take effect after the reboot, because the logd service starts when the system starts.
Step 5: Return the settings to the original state
After the diagnosis is complete, be sure to return the level to Errors or Off to avoid unnecessary load on the system.
What if the "Logue Level" item is not available?
Frequent problems and their solutions
When working with the magazine level, Xiaomi users sometimes face unexpected consequences. Let's look at the most common situations and how to fix them.
Problem 1: The phone stopped after the level change
If you have enabled Debugging or Information and notice lag, follow the following steps:
- Return the level to Errors or Off.
- Clear the system cache: Settings β Applications β Application management β Three points β Clear the cache of all applications.
- Reset the device.
If the brakes are left, try resetting through Settings β Additionally. β Resetting settings (without deleting data).
Problem 2: Logs take up too much space
At the Debugging level, logs can take up to 500MB per day (depending on the model) to clean them up:
- Connect your phone to your PC and use it. ADB: adb shell logcat -c This team will clear the log buffer.
- Or use the Logcat Reader app from Google Play (root rights required for complete cleanup).
Problem 3: No logs are saved after rebooting
By default. MIUI It doesn't save logs between reboots. To enable permanent logging, do:
adb shell setprop persist.logd.logpersistd 1
adb shell setprop persist.logd.logpersistd.size 10MThese commands will force the system to store the last 10 MB of logs in permanent memory, and be careful, this can speed up the wear and tear of the flash drive.
Problem 4: The βLog Service Not Runningβ Error
If you are trying to view the logs through ADB If you see this error, the logd service is not running:
- Check if the developer mode is on.
- The command is: adb shell start logd
- If it doesn't help, reboot your phone.
β οΈ Attention: On devices with MIUI 14 and later, when you turn on the Debugging level, you can automatically activate the Anti-Rollback protection, which means that once you return to the factory settings, you will not be able to install the older version. MIUI. Be careful!
Tips for optimizing work with journals
If you regularly have to work with logging (for example, for debugging applications or testing firmware), follow these guidelines to minimize the risks:
- π Use temporary logging. Enable high level only for the duration of diagnosis, then immediately return the settings to the original state.
- π± Instead of writing logs to internal memory, use external logging. ADB For data output on the PC: adb logcat > log.txt This will reduce the load on flash memory.
- π οΈ Filter logs. If you only need data on a specific process (e.g. wificond for Wi-Fi), use filters: adb logcat | grep wificond
- π Keep an eye on the battery. If you log in for a long time, connect your phone to charge, which will reduce the risk of a sudden shutdown.
For developers: if you are testing an app on Xiaomi, consider that MIUI By default, you limit the log buffer size to 256 KB. To increase it, use the command:
adb shell logcat -G 4MThis will set the buffer size at 4MB, but remember: the larger the buffer, the higher the load on RAM.
π‘
On devices with UFS 3.1 (e.g. Xiaomi 13 Pro) The impact of logging on memory wear is minimal thanks to Dynamic technology SLC However, on budget models with eMMC, the risk of damage to memory cells remains relevant.