0

Is there a way to send or redirect Weblogic (or Fusion Middleware) logging output to a database, without having to write a custom application? All the documentation I've read seem to deal exclusively with files.

3 Answers 3

2

Weblogic is not actually my field, but according to Oracle's documentation, you should be able to send WLS logs to syslog using Log4j Logger, from where it is again possible to forward them to MySQL (and some other) databases.

See here for rsyslog instructions and here for syslog-ng.

This syslog-approach has its benefits, since it is rather trivial to send syslogs from several servers to one central repository and then store them to a database there. Additionally there are front ends available (this to promote one I have used) to ease up analysing.

However this solution probably will not qualify as "without having to write a custom application". Perhaps someone else has better ideas.

1
  • This seems the only solution that might work, although it's convoluted and requires yet another service. It's disappointing: Weblogic ships all sorts of machinery to talk to databases, and all sorts of machinery to log, and still we need something as old and crusty as as an external syslog daemon just to push these damn messages into a db. Feb 15, 2013 at 0:01
1

Since Weblogic is capable of utilizing generic Log4j logger facility, it is possible to configure it to send the logs to database.

See here about configuring WLS to use Log4j and here and here about configuring Log4j to direct logs to a database.

This again may not qualify as "without having to write a custom application", but I'm afraid this is as much as out of the box as it gets.

1
  • The problem with Log4J is that their JDBCAppender supposedly does not log Exceptions, which is a bit of a dealbreaker. Feb 14, 2013 at 23:58
1

There are 3 types of log sources that an WebLogic application can generate:

  • STDOUT, WebLogic server, HTTP access, transaction and audit logging are using java.util.logging.Logger and can be configured to use log4j easily.
  • application logs - use server logging bridge See: http://docs.oracle.com/cd/E21764_01/web.1111/e13739/logging_services.htm#CHDBBEIJ
  • JVM STDOUT (like JVM out of memory errors, thread dumps), that can not be managed by log4j nor WebLogic. Those will always go to a file. (Or I could not find out a way to redirect them)

See also: http://docs.oracle.com/cd/E21764_01/web.1111/e13739/logging_services.htm

Any solution you will chose, you will need to take some time to understand it. Logging can be a very complex task.

1
  • The logging bridge is the most "out of the box" option, but it doesn't seem to have a db appender. I guess Log4j is the only way. Feb 14, 2013 at 23:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .