Felipe Carvalho
Felipe Carvalho

Reputation: 1

How to write LOGs in an APP made in flet/python, which appear in the DDMS?

I created an application in flet/python and installed it on my cell phone.

I use the DDMS program (Dalvik Debug Monitor Server) to view application logs on the cell phone.

But I can't see logs from the application made in flet/python.

What should I do?

What commands should I use in the code in flet/python to write logs that can be seen by DDMS?

I can see my LOGS from other applications on my cell phone, such as those created in Delphi and Java.

I've tried using logging and it doesn't appear in DDMS :

main.py

import logging

logging.basicConfig(level=logging.DEBUG, format="[LOG_MY_APP]: %(message)s")

def log_message():
   logging.debug("[LOG_MY_APP] This is a DEBUG log")
   logging.info("[LOG_MY_APP] This is an INFO log")
   logging.warning("[LOG_MY_APP] This is a WARNING log")
   logging.error("[LOG_MY_APP] This is an ERROR log")
   logging.critical("[LOG_MY_APP] This is a CRITICAL log")

log_message()

def main(page: ft.Page):
    ( . . . ) 

ft.app(main)

Upvotes: 0

Views: 35

Answers (0)

Related Questions