使用的Azure Blob存储与Java MVC Azure的网站 [英] Using Azure Blob Storage with java MVC Azure Web Site

查看:484
本文介绍了使用的Azure Blob存储与Java MVC Azure的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个的Java MVC Web应用程序并部署到Azure云。现在我想捕捉我的web应用程序日志到文本/ CSV文件,并存储在Azure的Blob存储文本/ CSV文件。谁能告诉我如何做到这一点?如何访问的Azure Blob存储。我通过这个<一去href=\"https://azure.microsoft.com/en-in/documentation/articles/storage-java-how-to-use-blob-storage/\"相对=nofollow>文章,但没有多大帮助。

I have created a java MVC web app and deployed on the Azure cloud. Now I am trying to capture my web application logs into the text/CSV file and store that text/CSV file in Azure Blob Storage. Can anyone tell me how to do this? How to access Azure Blob Storage. I went through this article but was not of much help.

请任何人的帮助。

注意 - 在上premises应用,我们可以做同样的使用属性档案与log4j的罐子。

Note- In on premises application we can do the same using properties file & log4j jar.

我想要做相同的Azure的web应用程序。

I want to do the same in Azure web App.

推荐答案

根据我的理解,我认为简单的方法来满足您的需求是使用Log4j追加的日志存储到的Azure Blob存储。它仅需要改变 log4j.properties 文件启用Azure中追加程序。

Based on my understanding, I think the simple way to satisfy your needs is using a log4j appender for storing the logs into Azure Blob Storage. It only need to change the log4j.properties file to enable the appender for Azure.

有实现Log4j追加对Azure的表的存储,而不是Blob存储在GitHub上2非官方的项目。

There are two unoffical project on GitHub for implementing log4j appender for Azure Table Storage, not for Blob Storage.

它们是如下


  1. saksham / log4j的,湛蓝: https://github.com/saksham/log4j-azure

  2. JMayrbaeurl /蔚的log4j: https://github.com/JMayrbaeurl/azure-log4j

  1. saksham/log4j-azure: https://github.com/saksham/log4j-azure
  2. JMayrbaeurl/azure-log4j: https://github.com/JMayrbaeurl/azure-log4j

您可以尝试把这些codeS来实现您的Blob存储,如的追加斑点

You can try to refer to these codes to implement your appender for Blob Storage, such as Append Blobs.

但我认为使用Azure的表的存储用于记录最简单的方法,正是因为作者认为。

But I think using Azure Table Storage is the simplest way for logging, exactly as the authors thought.

这篇关于使用的Azure Blob存储与Java MVC Azure的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆