【发布时间】:2015-07-21 05:33:01
【问题描述】:
我有一个简单的 python 应用程序并想使用谷歌云日志记录。我使用 docker 并使用 kubernetes 运行它。
如何将日志发送到谷歌云日志?
import time
import logging
def main():
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)
try:
while True:
logging.info('Working...')
time.sleep(1)
except KeyboardInterrupt:
logging.info('Stopped working')
pass;
if __name__ == '__main__':
main()
【问题讨论】:
-
对不起,我忘了说,我更新了问题thx
标签: python google-compute-engine kubernetes google-kubernetes-engine google-cloud-logging