Skip to content

Commit 4b2af64

Browse files
committed
Updated FileHandler example to match new structure
1 parent ecc450d commit 4b2af64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/logging_filehandler.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import storage
88
import adafruit_sdcard
99
import adafruit_logging as logging
10+
from adafruit_logging.extensions import FileHandler
1011

1112
# Get chip select pin depending on the board, this one is for the Feather M4 Express
1213
sd_cs = board.D10
@@ -21,7 +22,7 @@
2122
# Initialize log functionality
2223
log_filepath = "/sd/testlog.log"
2324
logger = logging.getLogger("testlog")
24-
file_handler = logging.FileHandler(log_filepath)
25+
file_handler = FileHandler(log_filepath)
2526
logger.addHandler(file_handler)
2627
logger.setLevel(logging.INFO)
2728

0 commit comments

Comments
 (0)