简体   繁体   中英

Weblogic server logs access separately for individual applications

I have a use case where two applications app1 and app2 are deployed on Oracle Weblogic Server 12c(Admin Server)(Linux machine). However two developers are working separately on application but the problem is in logs accessibility ie logs are being written in a single file .

AdminServer.log($MW_HOME/user_projects/domains/wls_domain/servers/AdminServer.log) and both want to access their logs separately either through 'tail' command or other way.

在此处输入图片说明

Already used tail command to access the log based on application URl but same file is being accessed for both developers.

tail -f $MW_HOME/user_projects/domains/wls_domain/servers/AdminServer.log

Any lead highly appreciated.

I understand that you're deploying both applications on the AdminServer. Since server logs everything happening inside of it in one log file, and because you're deploying to the same server, both logs will end up in the same log file.

In order to see different server logs, you must create seperate server instances. You can't expect to deploy on the same server and get 2 different server logs. After you create 2 managed server instances, you can deploy seperately and hence get seperate logs. There is no other way to do that.

But, you should use some kind of logging framework if you ask me. Not only that is the best way to go, but you can define different logging locations for different applications. And be totally in control. Ex: slf4j

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM