Logback in Azure Websites with PlayFramework

93 views
Skip to first unread message

Flavio Freitas

unread,
Sep 29, 2015, 6:34:45 AM9/29/15
to play-framework

Hello, 


I'm trying to enable Logback in my Playframework application, but it is not quite working at Azure environment, just in my dev's.

I added a file named logger.xml at the /conf folder, just like the site says. But when I create a war and upload it to Azure website, it seems to ignore it.


Any idea how to solve it?


I'm using PlayFramework 2.3


Thank you

Flavio Freitas

unread,
Sep 30, 2015, 9:25:13 AM9/30/15
to play-framework
Anyone discovered the correct format of the file logger.xml (i use the format suggested on the website) and the place it should be placed?

I tried several folders, but no success yet.

Thanks

Sean McClelland

unread,
Sep 30, 2015, 3:24:47 PM9/30/15
to play-framework
Are you deploying as a war file in your dev environment as well?

I run Play 2.4 on Azure but I don't deploy as war so my situation is different than yours. Unfortunately, I won't personally be able to help a ton as a result. Just as a wild guess (especially if you aren't deploying as war in dev environment) would be that the logger.xml file isn't being packaged in a way that your servlet server (Tomcat, Jetty, whatever) can read it properly. I might start researching where a logger.xml needs to be inside the war in order for it to be processed correctly and then checking to see if the play war is doing it properly. Of course, I could also be completely off on this guess.   

Flavio Freitas

unread,
Oct 1, 2015, 1:20:13 AM10/1/15
to play-framework
Thanks, Sean. 

Yesterday i was looking for the place to put the logger on my war, and i found out that it needs to be placed at WEB-INF/classes and then works just fine.

Thank you for the help ;)

Sean, what is the reason that you don't upload a war to Azure instead? And can you tell me how did you manage to use on azure without using a war?

[]s

Sean McClelland

unread,
Oct 1, 2015, 6:51:06 PM10/1/15
to play-framework
Hi Flavio,

I personally do not prefer the war approach as it puts the overall thread management back in the hands of Tomcat/Jetty/Whatever you use instead of in the hands of Netty like Play was really designed to have in charge. Additionally it is more of an optional side approach and as you have just found out isn't as well documented as the main deployment approaches. But companies with legacy servers might find the war approach simpler for them since they don't have to learn any new deployment practices.

I have Azure VMs running Ubuntu right now and in the past I deployed to them using just standard zip files. Before that, I used CentOS and packaged as an RPM. If you are using a Windows VM I know you can deploy as an MSI but it was complicated enough that I never bothered to learn that angle. The absolute easiest way to deploy is just to run activator dist which will create a zip file you can just deploy to Windows or Linux. But that could potentially lead to problems if you are working for any sizeable company as it could get unmanageable very quickly. These days I deploy as Docker containers by first deploying to a private docker registry I have hosted on Azure and then just running scripts to pull from the registry whenever I want to execute a new version of my code. If you have any questions about any specific deployment techniques please let me know.

Thanks,

-Sean

Onezino Gabriel Moreira

unread,
Jul 11, 2016, 11:16:16 AM7/11/16
to play-framework
Hi.

I know it's old but not found nothing about that.

Flavio, I'm trying figure out how deploy play as is. So I found it https://azure.microsoft.com/en-us/documentation/articles/web-sites-java-custom-upload/ and help me a lot.

Onezino Gabriel Moreira

unread,
Jul 11, 2016, 11:19:35 AM7/11/16
to play-framework

Will Sargent

unread,
Jul 11, 2016, 12:57:34 PM7/11/16
to play-fr...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/24b03acd-700e-4186-b03d-7c6a5fa23e84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages