Skip to content

Commit 7604bd9

Browse files
wsilva32mrpollo
authored andcommitted
add support for a logger function in errprinter (#681)
* add support for a logger function in errprinter * this enables other software to monkey patch the logger function to capture dronekit output and exceptions * moved print to stderr to logger function * monkey patching logger will replace the print to stderr functionality instead of supplement it
1 parent 12e18a5 commit 7604bd9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dronekit/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33

44

55
def errprinter(*args):
6+
logger(*args)
7+
8+
def logger(*args):
69
print(*args, file=sys.stderr)
710
sys.stderr.flush()

0 commit comments

Comments
 (0)