Skip to content

Commit ec06849

Browse files
committed
add method to set logging for splunklib directory
1 parent 00fadcb commit ec06849

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

splunklib/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
from splunklib.six.moves import map
1919
import logging
2020

21-
# To enable debug logs, set the level to 'logging.DEBUG'
22-
logging.basicConfig(level=logging.WARNING)
21+
# To set the logging level of splunklib
22+
# ex. To enable debug logs, call this method with parameter 'logging.DEBUG'
23+
# default logging level is set to 'WARNING'
24+
def setLoggingLevel(level):
25+
logging.basicConfig(level=level)
2326

2427
__version_info__ = (1, 6, 18)
2528
__version__ = ".".join(map(str, __version_info__))

0 commit comments

Comments
 (0)