Skip to content

Commit e0f224b

Browse files
committed
chore: updated logging examples
1 parent 5b95902 commit e0f224b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

graphfaker/logger.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
logger = logging.getLogger(PACKAGE_NAME)
88

9-
"""
10-
Set the default logging level to INFO.
11-
"""
9+
10+
# Set the default logging level to INFO.
1211
logger.setLevel(logging.INFO)
1312

1413

@@ -26,6 +25,11 @@ def add_file_logging(file_path=f"{PACKAGE_NAME}.log"):
2625
2726
Args:
2827
file_path (str): Path to the log file. Defaults to `graphfaker.log`.
28+
29+
Example:
30+
from graphfaker import add_file_logging
31+
# Configure custom file log
32+
add_file_logging("my_log.log")
2933
"""
3034
file_handler = logging.FileHandler(file_path)
3135
file_formatter = logging.Formatter(LOGGING_FORMAT)
@@ -42,7 +46,7 @@ def configure_logging(level=logging.WARNING):
4246
4347
Example:
4448
# Set logging level to INFO
45-
from graphfaker.logger import configure_logging
49+
from graphfaker import configure_logging
4650
import logging
4751
# Configure logging to INFO level
4852
configure_logging(logging.INFO)

0 commit comments

Comments
 (0)