Splunk Dev

python ログのローテーションの設定を変更すると SplunkWeb がハングする

CurryPan
Communicator

下記のように log.cfg の [python] スタンザを変更し、pythonログのローテーションサイズと個数を変更しました。

[python]
appender.python.maxBackupIndex = 10 
appender.python.maxFileSize = 500

変更を反映するために、Splunkを再起動したところ、SplunkWebがスタートできずハングしたようになります。web_services.log を確認したところ、下記のエラーメッセージが表示されていました。

2017-04-04 15:56:02,928 ERROR   [58e34382a0701d2955c0] root:814 - 'module' object has no attribute '10' 
Traceback (most recent call last): 
File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\appserver\mrsparkle\root.py", line 90, in <module> 
splunk.setupSplunkLogger(logger, LOGGING_DEFAULT_CONFIG_FILE, LOGGING_LOCAL_CONFIG_FILE, LOGGING_STANZA_NAME) 
File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\splunk\__init__.py", line 154, in setupSplunkLogger 
logging.getLogger(loggerName).setLevel(getattr(logging, level)) 
AttributeError: 'module' object has no attribute '10' 

pythonログのローテーション設定はできないのでしょうか。

0 Karma

CurryPan
Communicator

Splunkでは、Python ログのローテーションを設定することはサポート対象外となり、設定すると SplunkWebが正常に起動されなくなります。なお、SplunkWebが起動できなくなる問題につきましては、Splunk ver.6.5.4 にて修正されます。

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...