Skip to content

Commit db1623e

Browse files
authored
Merge pull request #3 from runZeroInc/upgrade-splunklib
Upgrade splunklib
2 parents 56828d3 + 99c577f commit db1623e

28 files changed

+1148
-986
lines changed

TA_runzero_asset_sync/bin/TA_runzero_asset_sync/aob_py3/splunklib/__init__.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2015 Splunk, Inc.
1+
# Copyright © 2011-2024 Splunk, Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License"): you may
44
# not use this file except in compliance with the License. You may obtain
@@ -14,7 +14,21 @@
1414

1515
"""Python library for Splunk."""
1616

17-
from __future__ import absolute_import
18-
from splunklib.six.moves import map
19-
__version_info__ = (1, 6, 18)
17+
import logging
18+
19+
DEFAULT_LOG_FORMAT = '%(asctime)s, Level=%(levelname)s, Pid=%(process)s, Logger=%(name)s, File=%(filename)s, ' \
20+
'Line=%(lineno)s, %(message)s'
21+
DEFAULT_DATE_FORMAT = '%Y-%m-%d %H:%M:%S %Z'
22+
23+
24+
# To set the logging level of splunklib
25+
# ex. To enable debug logs, call this method with parameter 'logging.DEBUG'
26+
# default logging level is set to 'WARNING'
27+
def setup_logging(level, log_format=DEFAULT_LOG_FORMAT, date_format=DEFAULT_DATE_FORMAT):
28+
logging.basicConfig(level=level,
29+
format=log_format,
30+
datefmt=date_format)
31+
32+
33+
__version_info__ = (2, 0, 2)
2034
__version__ = ".".join(map(str, __version_info__))

0 commit comments

Comments
 (0)