WLS logging api

Hi All,
My app is running on WLS 8.1. I am using WLS logging api to log the messages and
I also email those messages. I would like to configure the logging so that I can
send a particular message once every x time interval.
e.g. If the same error message is thrown multiple times in an hour, currently
the app will send those many emails. I want to change it so that even though the
same error message is thrown multiple times in an hour, the app will send only
one email.
Is there a way to do this using WLS api?
Thanks,
WD

I did not set up the email messages within WLS 8.1. I have written my own emailer
class that I use.
"Sean C. Sullivan" <nospam@spamfree> wrote:
>
How did you setup error email messages with BEA Weblogic Server 8.1?
Can this be setup from the Admin console?
WD wrote:
Hi All,
My app is running on WLS 8.1. I am using WLS logging api to log themessages and
I also email those messages. I would like to configure the loggingso that I can
send a particular message once every x time interval.
e.g. If the same error message is thrown multiple times in an hour,currently
the app will send those many emails. I want to change it so that eventhough the
same error message is thrown multiple times in an hour, the app willsend only
one email.
Is there a way to do this using WLS api?

Similar Messages

  • WLS logging/statistics

    Hi!
    I wonder whether there is possible to gather the continous information
    one can view in the WebLogic Console for statistical purposes.
    E.g. it could be valuable to view curves for connection pool usage,
    memory usage, bean cache usage and so on.
    Thanks for any comments on this topic :-)
    -jo
    ----- BEA signature --------------
    Jo Torsmyr
    Senior Consultant
    Mobile: +47 92659288
    Email: [email protected]
    BEA Systems Oy
    Strandveien 50, Godthaab
    P.O. Box 344
    N-1326 Lysaker
    Norway
    Telephone: +47 67838800
    Fax: +47 67838801
    WWW: www.bea.com

    I did not set up the email messages within WLS 8.1. I have written my own emailer
    class that I use.
    "Sean C. Sullivan" <nospam@spamfree> wrote:
    >
    How did you setup error email messages with BEA Weblogic Server 8.1?
    Can this be setup from the Admin console?
    WD wrote:
    Hi All,
    My app is running on WLS 8.1. I am using WLS logging api to log themessages and
    I also email those messages. I would like to configure the loggingso that I can
    send a particular message once every x time interval.
    e.g. If the same error message is thrown multiple times in an hour,currently
    the app will send those many emails. I want to change it so that eventhough the
    same error message is thrown multiple times in an hour, the app willsend only
    one email.
    Is there a way to do this using WLS api?

  • Logging API

    I am trying to use the logging APIs within a channel's java application code. The code will successfully create the log file, but I can not get it to log any information into that file. Can anyone point me to what I might be missing?
    I am running Portal 6.0 on Solaris 2.9 with JVM version 1.3.1_04.
    Here is the code I am working with, which is more or less right out of the developers guide. When I execute it i get no errors, no exceptions, no data in log file.
    Any help would be appreciated.
    Bill
          try {
                SSOTokenManager manager = SSOTokenManager.getInstance();
                token = manager.createSSOToken(req);
                if (!manager.isValidToken(token)) {
                        message = "*** InValid Token. ***";
          } catch(Exception e){
                        message = "*** SSOToken Exception. ***" + e.toString();
           try {
                      LogManager logger = new LogManager(token);
                      logger.create("SampleLog.log");
                      LogRecord lr = new LogRecord("Session", "Sample Data");
                      logger.write(lr, "SampleLog.log");
            } catch (Exception e) {
                          content.append( "Logging Error: " + e.toString() + "\n");             
            }

    Thanks for your feedback.
    BEA is on the expert group of this JSR and we are tracking this standard.
    We will consider implementing this API in the next release.
    Wong Kok Wai <[email protected]> wrote in message
    news:[email protected]..
    Sun has released the public draft of the Logging API
    (http://java.sun.com/aboutJava/communityprocess/review/jsr047/). Suggest
    for WLS to implement this API, except the package name, to minimise
    porting in future.

  • Logging api hangs

    Im starting a java application from an applet calling Runtime.getRuntime().exec("java bla bla bla")
    Worked fine until I implemented Java 1.4 logging api. Now the application hangs after writing a few info lines to a FileHandler log. It's clearly the logger that hangs because if I set log level = OFF the the program runs just fine.
    Has anyone seen anything similar?
    * To make it harder to debug, the problem only occurs when starting the application from an applet.

    That might happen that spawn process generates lots of output.
    Runtime.getRuntime().exec() returns object of type java.lange.Process. That object provide access to the stdout and stderror of the newly created process. If those streams are not cleaned properly then process will hang as soon as OS buffers of those stdout and stderr streams get full.
    One way to work around it just read output from the process and throw it away. You can try using something like this:
    package com.xxx;
    import java.io.InputStream;
    public class ProcessOutputWaster {
        public ProcessOutputWaster(Process process)
            throws Exception {
            createWorker(process.getErrorStream()).start();
            createWorker(process.getInputStream()).start();
        protected Worker createWorker(InputStream is) {
            return new Worker(is);
        protected static class Worker
                  extends Thread {
            private InputStream inputStream_;
            public Worker(InputStream inputStream) {
                inputStream_ = inputStream;
            public void run() {
                if (getInputStream() != null) {
                    try {
                        byte[] buffer = new byte[1024];
                        int read;
                        while(true) {
                            read = inputStream_.read(buffer);
                            if (read < 0)
                               break;
                    catch(Exception ex) {
                        Handle the error some how. E.g. show the error box.
    Process process = Runtime.getRuntime().exec(strCommand);
    ProcessOutputWaster outputWaster = new ProcessOutputWaster(process);

  • WLS logging - quick questions

    Hi
    In JDeveloper, we could write our application logging to logs for debugging and viewable from JDeveloper.
    When we deploy to Standalone weblogic server, we cant find our logging.
    Of the 3 loggers (Msg Catalog, nonCatalog, Commons log API),
    Which logging mechanism is the best practice used logging for development environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Which logging mechanism is the best practice used logging for production environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Thanks

    Hi
    In JDeveloper, we could write our application logging to logs for debugging and viewable from JDeveloper.
    When we deploy to Standalone weblogic server, we cant find our logging.
    Of the 3 loggers (Msg Catalog, nonCatalog, Commons log API),
    Which logging mechanism is the best practice used logging for development environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Which logging mechanism is the best practice used logging for production environment ? Does it print to AdminServer.log ? If not, how can we accomplish that printing app log to AdminServer.log ?
    Thanks

  • Practical use of Java Logging API

    There was a recent technical tip about the Java Logging API, but after reading it I still don't understand how to use it in a real situation.
    Can anyone help me with this with a practical example?
    At the moment I have try-catch clauses that catch exceptions and print a message in a System.err log that I can consult if there's a specific problem.
    How should I be using the Logging API? I feel sure that it can help me, but can't see how.
    Thanks for any practical information.

    What if you don't want to write to system.err anymore? What if you need to write something to the windows event log? What if system.err is irrelevant (nt service), ...
    Btw, lots of examples on the JDK1.4 logging api:
    http://www.esus.com/docs/GetIndexPage.jsp?uid=265

  • How to set NC Log API

    Hi all,
    I want to use the following NC log API,but I don't know how to initialize the interface's java object and set the parameter "ApplicationVO".
    Interface LogNCApplicationInterface
    Method ApplicationVO addNDone(ApplicationVO applicationvo)
    Please help me.Thank you!
    Qiang Liu

    if you just need to log an NC the minimum fields you need to set are the following:
    CreateNCRequest ncRequest = new CreateNCRequest();
    ncRequest.setActivity("NC500"); // activity where NC is logged - can be any name
    ncRequest.setSfcRef(new SFCBOHandle(site, sfcParent).toString());// the SFC for which you are reporting an NC
    // ncRequest.setValidateNCCodeOperation(true); // no need to set it, it's true by default
    // nc code reference for nc code that is reported
    // nc code must exist in the system
    ncRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCCODE").toString());
    // required custom fields must be set
    CreateNCResponse ncResponse = ncPSI.createNC(ncRequest);

  • Logging the Runtime Fault messages BPEL in WLS logs

    Requirement: I need to capture the run time fault from BPEL processes in the WLS logs how to do this?
    Solution: I have tried following I created the Java class ot initialise the Java logging.
    Java snippet:
    private static final Logger logger = Logger.getLogger("oracle.soa.Logger");
    static {
    LogFormatter.configFormatter(logger);
    public static final void log(String message) {
    logger.log(Level.INFO, message);
    In my BPEL process I have the CatchAll activity
    In the ‘AssignFault I’ have the assignments using ora: getFaultAsString() , but I’m not getting the expected fault in Assign Activity which we see in Audit Trail.
    In Audit Trail i see the following message against the my Validate Activity
    "Invalid data: The value for variable "ReceiveXML_Read_InputVariable", part "body" does not match the schema definition for this part Element 'TimeBandList' not expected.. The invalid xml document is shown below:"
    The ora: getFaultAsString() is showing the "com.oracle.bpel.client.BPELFault: faultName: {{http://docs.oasis-open.org/wsbpel/2.0/process/executable}invalidVariables} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}"

    I had gone thru that documentation. I needed something more than that.
    Well, I want to know what entries go into the access log & what into custom
    log of ours.
    Actually, the entries with 200 status only are going into our custom log ,
    how can I make the entries with status 302 (redirection) to get into the
    custom log?
    Thanks.
    priya
    Robert Patrick wrote:
    Yes. http://www.weblogic.com/docs51/admindocs/http.html#logs
    Priya Bangara wrote:
    Hi,
    Our company has WebLogic Server 5.0 b2 running on our livesite. They
    have been using WLS's access log and their own custom log. Now, they
    have found some problem with the logs and I'm looking into it.
    I don't find any documentation on 5.0b2 on BEASYS's site anymore. Are
    all the features like 'extended log format', 'log rotation' of WLS 5.1
    were there in 5.0 b2 ?
    Please help. Issue is very critical. I would appreciate if you could
    also send me some links where I can find more info on WL's logging
    mechanism.
    Thanks in advance,
    Priya

  • Setting Logging API config file

    Hi,
    Is there a way I can set the Logging API's config file (java.util.logging.config.file) from within my program? I have tried using System.setProperty but it doesn't seem to work. The only way I seem to be able to set the property is with -D on the command line.
    Thanks
    Rob

    Is there a way I can set the Logging API's config file (java.util.logging.config.file) from within my program? I have tried using System.setProperty but it doesn't seem to work. The only way I seem to be able to set the property is with -D on the command line.Read the Logging Overview Dokumentation
    anyway
    InputStream inputStream = new FileInputStream("logging.properties");
    LogManager.getLogManager().readConfiguration(inputStream);
    ...

  • Logging API AdapterFramework 3.0

    Hello,
    i still wonder why it was necessary to provide an own API for Logging and Tracing inside the Adapter Framework.
    The Web AS Logging API does the same.
    Developing an JCA Adapter that can be used inside the XI Adapter Framework and as a Basic JCA 1.0 Adapter in the Web AS, theres's need to provide support for both APIs.
    Has anyone an idea to solve this problem?

    There is a lot of logging to the console with 2.3.0 RC1 when I am doing
    any trips to the datastore, is it possible to switch this off? I am
    using Kodo.rar in Jboss 3.0.0Remove the 'com.solarmetric.kodo.Logger' property from your properties file. You can also remove it from the Properties instance you use to construct the PersistenceManagerFactory. If you'd like to log to a file instead, change the property to the name of a file to log to.

  • Forum help for Logging api

    I need help with logging api. Which developer forum do I have to use for the same. Thanks.

    Have you got the SAP Wrapper for logging API? if you got, can you give it to me:)

  • Is this logging code faster than using a standard logging API like log4J

    is this logging code faster than using a standard logging API like log4J or the logging API in java 1.4
    As you can see my needs are extremely simple. write some stuff to text file and write some stuff to dos window.
    I am thinking about using this with a multi threaded app. So all the threads ~ 200 will be using this simultaneously.
    * Tracer.class logs items according to the following criteria:
    * 2 = goes to text file Crawler_log.txt
    * 1 = goes to console window because it is higher priority.
    * @author Stephen
    * @version 1.0
    * @since June 2002
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.text.*;
    class Tracer{
    public static void log(int traceLevel, String message, Object value)
    if(traceLevel == 1){
    System.out.println(getLogFileDate(new Date()) +" >" + message+ " value = " + value.toString()););
    }else{
    pout.write(getLogFileDate(new Date()) +" >" + message + " value = " + value.toString());
    pout.flush();
    public static void log(int traceLevel, String message )
    if(traceLevel == 1){System.out.println(message);
    }else{
    pout.write(message ) ;
    pout.flush();
    //public static accessor method
    public static Tracer getTracerInstance()
    return tracerInstance;
    private static String getLogFileDate(Date d )
    String s = df.format(d);
    String s1= s.replace(',','-');
    String s2= s1.replace(' ','-');
    String s3= s2.replace(':','.');
    System.out.println("getLogFileDate() = " + s3 ) ;
    return s3;
    //private instance
    private Tracer(){
    System.out.println("Tracer constructor works");
    df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
    date = new java.util.Date();
    try{
    pout = new PrintWriter(new BufferedWriter(new FileWriter("Crawler_log"+getLogFileDate(new Date())+".txt", true)));
    pout.write("**************** New Log File Created "+ getLogFileDate(new Date()) +"****************");
    pout.flush();
    }catch (IOException e){
    System.out.println("**********THERE WAS A CRITICAL ERROR GETTING TRACER SINGLETON INITIALIZED. APPLICATION WILL STOP EXECUTION. ******* ");
    public static void main(String[] argz){
    System.out.println("main method starts ");
    Tracer tt = Tracer.getTracerInstance();
    System.out.println("main method successfully gets Tracer instance tt. "+ tt.toString());
    //the next method is where it fails - on pout.write() of log method. Why ?
    tt.log(1, "HIGH PRIORITY");
    System.out.println("main method ends ");
    //private static reference
    private static Tracer tracerInstance = new Tracer();
    private static Date date = null;
    private static PrintWriter pout = null;
    public static DateFormat df = null;
    }

    In general I'd guess that a small, custom thing will be faster than a large, generic thing with a lot of options. That is, unless the writer of the small program have done something stupid, og the writer of the large program have done something very smart.
    One problem with java in this respect is that it is next to impossible to judge exactly how much machine-level processing a single java statement takes. Things like JIT compilers makes it even harder.
    In the end, there is really only one way to find out: Test it.

  • Customize Java logging API

    Want to customize java.util.logging api, like write message to message queue, xml file, etc. Would you guys give me some useful suggestion or resource or link? Thanks.

    Just write a sub-class of Handler such as this:
    public class JMSHandler extends Handler {
    }Look into the JDK source code such as MemoryHandler and StreamHandler on how to implement it.

  • How come logging is so hard? - JDK1.4 Logging API

    Have a small project on hand. A standalone java program trigged by unix cron job and do some data cleaning. Need to implement a very simple logger. Tried to use JDK1.4 Logging API, here's my code:
    public class MyLogManager {
         public final static String NAME = "mylog";
         public final static String LOG_FILE_NAME = "C:/my.log";
         private static Logger logger;
         static {
              try {
                   logger = Logger.getLogger(NAME);
                   Handler fh = new FileHandler(LOG_FILE_NAME);
                   fh.setFormatter(new SimpleFormatter());
                   logger.addHandler(fh);
                   logger.setLevel(Level.ALL);
              } catch (Exception e) {
                   System.out.println("Unable to initialize logger: " + e.toString());
                   System.exit(1);
         public static Logger getLogger() {
              return logger;
    and use MyLogManager.getLogger().info("message") to log message.
    It works and my.log was generated with log message. However, the problem is everytime a new job (java myprogam ...) runs, it deletes the old log file and create a new one.
    I want the message to be appended by the end of old log file. What should I do? Any help?

    Use log4j (google for it - it's on http://jakarta.apache.org).
    If log4j.jar is in your classpath, the JDK 1.4 logging framework will use it automatically. Then all you have to do is to configure a log4j.properties file in your classpath to log wherever you want it to.
    And log4j is sorta-smart about multiple programs logging to the same file.

  • Jdk logging api

    iam using jdk logging api. I've a scenario,
    where there are two subclasses for a parent one.
    is it suffice to use Logger.getLogger("packagename.superclass");
    in the parent class, for all the subclasses to use the same logging medium.
    Thanks

    What happened when you tried that?

Maybe you are looking for

  • Is there a way to create a Word Frequency list in 8.2.5?

    I would like to be able to create a Word Frequency list for each PDF in a batch of PDFs. I have used Batch Processing to make sure each one is OCR/searchable. Is there a way to do this in Acrobat Pro 8.2.5 / Windows XP? Thanks!

  • Sync iCloud Calender with iPhone 2g

    Hi! I am using an iPhone with iOS5 and have the iCloud Calendar enabled. That isworking fine with my iTunes (central instance for 6 iPods and 2 iPads and 2 iPhones based on windows XP and using MS Outlook 2007). Everything is working fine but not the

  • SQL Server 2008R2 Standard edition

    Hi, I'm trying to add replication on an existing SQL 2008 server. While adding replication I should see all other things that are already installed but I don't. SQL installation thinks it's a brand new installation. What can I do about this ? thanks

  • LR2.7 does not bring up images from Nikon D7100

    LR 2.7 does not bring up images from Nikon D7100 which I have just purchased.  I have downloaded latest DNG raw converter 7.4 but does not work.  The images come through fine in Bridge but not Lightroom.  What is the problem?

  • Error installing SAPNW2004sSneakPreviewABAP

    Hello, installing the SAPNW2004sSneakPreviewABAP I received in phase 3 of 24 the following error: ERROR 2006-01-05 19:03:22 CJS-30129  Creating node $(DIR_TRANS) with type DIRECTORY failed. Original exception text was: syslib.filesystem.nodeCreationF