Weblogic : Log errors in a specific log file for a managed server

MTranchant

For a given managed server (not a whole weblogic server), I need to copy / reroute all WARNING, ERROR, INCIDENT_ERROR level messages to a log file (that has to have rotation settings). Let's say "server1.err.log". The rest of the messages (level under WARNING) have to be written in a different file, for example, "server1.log".

How can I do that ? My Weblogic server version is 10.3.6.0. I also asked this question in OTN without successfully getting an acceptable response..

Thanks in advance

99Sono

So here is your answer, finally found the missing piece of the puzzle to very obscure Weblogic Loggin Service architechture.

To get what you want you need to do the following: (1) Read through the following documentation piece http://docs.oracle.com/cd/E21764_01/web.1111/e13739/listening.htm#WLLOG188

(2) Then using weblogic specific Jars, code your own Log4J Appender or Jul Handler

(3) Make sour appender subscribe on the Weblogic Server logger. The server logger of weblogic is just a shell that is being route logging events from deployed applications as well as weblogic internal code - such as when your code blows up and the EJB container logs and error.

(4) Code into your handler whatever logic you want.

I will not provide you my design architechture for this, but I will give you an extra two scents:

Be very careful on how your appender logs events coming from weblogic. Make sure that whatever your Appender does for logging the Weblogic WARNINGs or Weblogic INFOS or Errors does end up creating new logging events to the weblogic server logger, or you will create an infinite recursive loop of logging and posisbly even dead lock the logging framework.

But this is the solution for what you want to do - nothing else with work on the Admin Console - you have to realize the weblogic logging architechture is like a closed rock that wants to swallow all the log events and present yoiu the not so useful console log overview of those log events.

I personally do not like it, I think its obscure, but at least you have a way to plugin your own to code their logging architechture.

Good luck.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Weblogic : Log errors in a specific log file for a managed server

From Dev

Weblogic 12.2.1 managed server access.log not updating

From Dev

How to log errors for specific script to a file?

From Dev

Log rotation error in Weblogic server

From Dev

SQL Server - View a specific log entry in transaction log file (ldf)

From Dev

Rsyslog not forwarding specific log file to remote server

From Dev

Rsyslog not forwarding specific log file to remote server

From Dev

Logback is not writing specific log file on the Linux server

From Dev

Send log errors to a file

From Dev

Send log errors to a file

From Dev

how to create log file to errors?

From Dev

How to log to a log file in Weblogic 12c

From Dev

How to log access to a specific file?

From Dev

Weblogic log filters customization

From Dev

How to view Django test server errors log?

From Dev

Using Perl, how can I extract from a log file only the errors that happened during a specific minute?

From Dev

Errors with PHP & Weblogic Server

From Dev

log4j and Weblogic Server : Logs not getting generated

From Dev

Logback: how to log only errors to file

From Dev

Why does Winston not log errors to file?

From Dev

Log file is not containing the database errors in liferay 6.1

From Dev

Server log file HEAD requests

From Dev

Reading SQL SERVER Log file

From Dev

convert weblogic admin server into managed server

From Java

Retrieve the commit log for a specific line in a file?

From Dev

grep specific pattern from a log file

From Dev

Python - Find a specific mac address in a log file

From Dev

tail a log file but show only specific lines

From Dev

tail a log file but show only specific lines

Related Related

HotTag

Archive