File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ """
3+ Test to see all output including debug messages
4+ """
5+
6+ import asyncio
7+ import logging
8+ from mavsdk import System
9+
10+ # Setup logging to see EVERYTHING
11+ logging .basicConfig (
12+ level = logging .DEBUG , format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
13+ )
14+
15+
16+ async def test_see_all ():
17+ print ("Testing with DEBUG level to see all messages..." )
18+
19+ drone = System ()
20+ try :
21+ await asyncio .wait_for (drone .connect ("invalid://bad:connection" ), timeout = 8 )
22+ except asyncio .TimeoutError :
23+ print ("Timed out - all messages should be visible above" )
24+ except Exception as e :
25+ print (f"Got exception: { e } " )
26+
27+
28+ if __name__ == "__main__" :
29+ asyncio .run (test_see_all ())
You can’t perform that action at this time.
0 commit comments