How to configure log4J ?

Hi All,
Can anyone please let me know how to configure log4J in portal?
I searched in sdn, help.sap and market place, but in vain. Could n't really get any help.
Thanks in advance
-Sudheer

Hi Kathik,
That's pretty much not very different from configuring log4j in another IDE. Look at the documentation website of the Log4J project, see: http://logging.apache.org/log4j/docs/documentation.html.
You can find a good intro at: http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/log4j/log4j.html.
You could also use the logging mechanism of the Java SE.
Ronald

Similar Messages

  • How to configur log4j logging for weblogic 10.1

    Hi,
    I am tried to set log4j logging for my application running in weblogic 10.1. I set a log4j.properties file and loaded the properties by a servlet. Where its load the properties files and configure it by PropertyConfigurator.
    The same logic has worked out in websphere. But in weblogic, it is not working. I set the server logging and domain logging to Log4j in Admin console. Now it is writing all the log statements.
    If i write a property for a package to Error level and root level is Debug. Its not working, all debug statements are getting written.
    Can you please tell me the steps to configure log4j logging in weblogic 10.1.
    Thanks & Regards,
    Nasrin.N

    Did you manage to get this working?
    If yes ... what did you do?
    I am having the same problem implementing commons-logging with log4j

  • How to configure log4j in oracle bpm

    we can put log4j.jar in obpm and can use that as a logger, But I dont know the concepts of log4j.
    Can anyone please help me know what all we need to do to configure this, what relations are there between log4j.jar, log4j.properties, where to keep these files, where to specify the location of these files etc.
    Thanks in advance,
    Sebin.
    Edited by: 795497 on Sep 19, 2010 10:54 PM

    I'll take a quick try at this, but i am far from an expert with log4j....
    For log4j to log, you need an xml file that contains logging levels and other instructions... This needs to be on the classpath of the environment for bpm to be able to use it...
    I believe the name of this xml is denoted in the properties file...
    If you want to use this in studio, i suggest putting the xml file in: C:\OracleBPMStudioHome\eclipse\jre\classes *note: you will have to create the classes folder, but bpm studio will automatically add this to the classpath...
    In standalone enterprise put it: C:\OracleBPMEnterpriseHome\jre\classes (again, create the classes folder, its also already on the classpath)
    For J2EE install, just add the path to the classpath variable in startWebLogic.cmd (or .sh)
    Also note - the file to log to, needs to be created prior to logging (ie, log4j will not create it)
    HTH
    -Kevin

  • Configure log4j to write to different log files conditionally

    Hi folks,
    Is there is way log4j could be configured to write to multiple log files conditionally? Let me try to explain what i am trying to do.
    I have two classes DatabaseChecker and FTPChecker extends Checker class. Within Checker class, there is a method logTestResult(CheckerType c, boolean isFailed, int retry, int isMaxRetryExceeded). Depending on the CheckerType(database or FTP), I need to write log outputs to different files (dbchecker.log or ftpchecker.log). How do i configure log4j to do this?
    I've seen how to configure log4j based on classes from different package, but not sure on this one. Any clue would be much appreciated.

    lgmqy2000 wrote:
    I have two classes DatabaseChecker and FTPChecker extends Checker class. Within Checker class, there is a method logTestResult(CheckerType c, boolean isFailed, int retry, int isMaxRetryExceeded). Depending on the CheckerType(database or FTP), I need to write log outputs to different files (dbchecker.log or ftpchecker.log). How do i configure log4j to do this?
    if (checker.isType(CheckerType.DATABASE)) {
        dbLogger.info(someMessage);
    } else if (checker.isType(CheckerType.FTP)) {
        ftpLogger.info(someMessage);
    } else {
        defaultLogger.info(someMessage);
    }~

  • Configuring Log4j for weblogic

    Hi
    can any one tell me how to configure Log4j for weblogic. I have added the log4j jar files to the weblogic classpath but it does not seem to work..
    Thanks and Regards
    Narayan

    You must make a new directory on the same level with applications directory, place "log4j.properties" file in it, include this directory in the "PRE_CLASSPATH" entry in your startup script and that's all.
    Sample line in "startWebLogic.cmd" script
    'set PRE_CLASSPATH=%_LIBJARS%;classes'
    in classes dir you have "log4j.properties"
    Should work,
    Cristian Negoita

  • How can configure .properties file and  log4j on weblogic 8.1 SP5

    Hi,
    I know this is not right forum for post this question.But I hope I'll get my perfect answer here.
    I have 2 questions.
    1. Where I'll keep my .properties file in weblogic 8.1 SP 5. means I have one own .properties file which is contains some proxy settings and this .properties resides on .war file(now), But I want move this propeties file outside .war file. So Where I'll keep in weblogic 8.1 SP 5.
    2. How can we configure log4j in weblogic?
    Please reply me.
    Regards,
    Pattanaik

    You can add your.properties and log4j.properties to the classpath cant you?
    You just need to edit setEnv.cmd (if i remember correctly) in your weblogic server folder to add the folder containing the properties files to the classpath variable.

  • How to Enable Log4j in Struts

    Hi,
    I have a struts application and I need to implement a logger for it. I would like to use Log4j but am having problems initializing it.
    Because I am using struts, I do no have access to the Action servlet and so cannot place the intiializing code in the servlets init() method.
    Is there a way of using the struts-confix.xml file to enable Log4j logging ?
    Basically I need the application to load up the log4j.properties file using
    PropertyConfiguratior.configure("log4j.properties");
    But how do I do this in Struts ??
    thanks
    Paul

    Struts core library uses commons logging , some drop log4j.properties files /WEB-INFO/classes, cooomons lgging will pick up and initialize.
    Other way is write a plug-in and load the log4j configuration
    ==============================================
    1. Add plug in to struts-config files like validator plug in
    <plug-in className="com.tests.utl.Log4jPlugin">
    <set-property
    property="log4jconfig"
    value="/WEB-INF/log4j.xml"/>
    </plug-in>
    2. Drop log4j.xml file in "/WEB-INFO" folder
    3. Sample "log4j" plug in java class, here key is define property "log4jconfig" as plugin setter/getter, struts will set the value read from struts-config.
    ================================
    public class Log4jPlugin implements PlugIn {
    private String log4jconfig;
    public Log4jPlugin() {
    public void destroy() {
    System.out.println("Destroying Hello World PlugIn");
    public void init(ActionServlet servlet, ModuleConfig config)
    throws ServletException {
    URL url =null;
    try {
    url = servlet.getServletContext().getResource(log4jconffile);
    System.out.println(" url " + url);
    } catch (MalformedURLException ex) {
    ex.printStackTrace();
    DOMConfigurator.configure(url);
    public String getLog4jconfig() {
    return log4jconfig;
    public void setLog4jconfig(String log4jconfig) {
    this.log4jconfig = log4jconfig;
    }

  • Weblogic 10 - Help me configure Log4j ????

    I have deploy an Application and using Weblogic 10.3. I want using Log4j to control debug but i don't know configure it. Who was using it please help me.

    Re: How to use log4j into weblogic 10.3

  • How to configure oracle listener profile for multiple oracle database

    Hi,
    I am going to install solution manager system in the same server of ERP EHP4 on Windows. Both DB are oracle.
    I'd like to know how to configure listener in this kind of envirnmonent.
    a. use two listener and different ports
    b. use same listener but different ports
    c. use same listener and same port
    Which is the correct mothed?
    And, after installation, there seem three set of profiles of listten, one for ERP, one for SLM, and the other for OS?(%windir%system32), which one is functional?
    Please advise.
    Thanks a lot.
    Regards,
    Alex

    Hi,
    standard installation is creating new configs for listener for each instance.
    I would recommend to use one listener per each instance.
    YOU CAN NOT HAVE one port number for two differnet systems!
    If you want to use one listener than you must adapt tnsnames.ora, listener.ora and ensure that both systems will use different port numbers.
    For example PORT= 15<system number>
    Peter

  • How to configure one TREX host with multiple index servers ?

    Hi All,
    Does anyone know how to configure TREX on the one host,
    with multiple index servers ?
    Reason for this is to make better use of resources available on the host server(4 Gig, 4 Processor, Windows2003), to improve the search performance of
    our KM content for portal users.
    I am using TREX 7 and have not been able to do this,
    despite reading the Single and Distributed install
    documentation.
    Any help would be appreciated.
    Regards,
    Andres

    Hi Andres,
    To make use of the RAM a Server provides you have to run two indexserver processes (each can then consume 2 GB);
    Proceed like this:
    1. Go to TREXdeamon.ini; check if section [indexserver2] is there (it is already provided, but not active in standard installation)
    2. In TREXdeamon.ini go to
    [daemon]
    references sections below
    programs=nameserver,preprocessor1,indexserver1,queueserver,alertserver
    and add indexserver2 here. Restart TREX; second porcess is then started; can be checked in TREX monitor in Portal as well
    3. To distribute existing indexes to the new process, start TREXadmintool and go to Index: Landscape
    Go to the last two columns and move the indexes (move master here/secondary mouse click)
    If you don't distribute the indexes the new index server process will be regarded when an new index is created.
    Hope this helps!
    cheers
    Bettina

  • How to configure request manager service for multiple website in one web application

    I have set up sp 2013 as below:
     web application : wa1
    site collection : sc1
    sp site: site1, site2
    I used 2 WFE, 1 APP, how can I use request manager service to control  site1 to wfe1, site2 to wfe2?
    Awen

    That's not what i'd describe as load balancing.
    A better description would be load-isolation. In your description then if the load on site1 was large (and growing) but site2 was quiet then site1 would struggle and eventually become unable to handle the number of users but site2 would still be ok. That's
    fine from a QOS point of view but it's not the norm for load balancing. It would work in simple scenarios but the out of the box load balancing tools are much better suited than that sort of approach.
    This article shows how to configure the RMS and may help show how your request is difficult to configure:
    http://www.harbar.net/articles/sp2013rm2.aspx

  • How to configure 3 different members under a single Month column

    Hi SAP Gurus,
      My client requirement is to show the report in following format, where under a Month column 3 different columns having
    1) Quantity (Number of unit ) of a product,
    2) its rate (Amount per unit), and
    3) Total (amount)    will appear in a single report.
       I have Month as a Time Dim, while Qty, Rate and Total are members of account dim.
    Que: How to configure such scenario in a single report?
    Jan.2011
    Product Category:            Qty (Input)   Rate (Input)   Total (Output)                    
    Product 1                                               
    Product 2                                             
    Product 3                                             
    Product 4                                             
    Group1                                             
         Where: Total = Qty X Rate                                        
    Thanks and Regards,
    SouarbhD

    Hi,
    Use an EVDRE to create your input schedule. You need to have one row with products and 2 columns with time and account. Choose the memberset options as per the requirement. For the accounts, is total calculated with a dimension formula? If yes, then you just need to enter the values for quantity and rate and send the data. The total will be calculated by the system and will be displayed automatically.
    Hope this helps.

  • How to configure an Alert message if communicationChannel(JMS) stops

    All,
    Is there a way how to configure an alert when the communication channel stops.
    <b>Scenario:</b>
    In the path Runtime workbench->Component Monitoring->Adapter Engine->Communication Channel monitoring, if we see that a communication channel has stopped(RED traffic light as Status), then can we trigger an alert notification for same.
    Currently we have alrerts configured for any message/s failure in the JMS Adapter Framework. So can we trigger simmilar alerts when a comm channel stops(for whatever reason).
    Thanks in advance
    RK

    Hi Sreeram,
    Thanks for the quick reply.
    We have a scenario where we activate individual channels at a given time. So in this case, Adapter will always be in RED as all queues are never running in our scenario.
    So we need an ALERT to be triggered for individual comm channels. Is theer any way that you can think of ?
    Thanks and regards
    RK

  • How to configure multiple IP addresses on one NIC?

    Hi,
    I just installed a OVM Server in version 3.2.1 and the according VMManager. Now i wanted to try to configure the Server/Server Pool. Now i come across a problem, which was already a big problem in OVM 2 while configuring the Networks.
    All our OVM Servers have three NICs in them. One is for VMs and Management, the others are for connection to our SAN (Dell PowerVault MD 3220i). My problem is, that due to the network setup, the two NICs for storage need two IP addresses in two different networks each. This shouldn't be a problem, because usually in linux all you have to do is configure something like eth1:1. I remember having huge trouble configuring it in our OVM 2 cluster up to the point where I had to write a shell script to configure the second IP.
    Anyways, I have configured two of the storage networks on eth1 and eth2 of the VM Server. Now i cannot configure any more IP addresses, because eth1 and eth2 are not available anymore for configuration in a third network. I really hoped that it would be possible in OVM 3 to configure multiple IP addresses. And probably it is only my lack of knowledge of how to configure it.
    So any advice is well appreciated.
    Thanks!
    Regards,
    Marek Hubatka

    You should be able to do this by using "VLAN Groups".
    http://docs.oracle.com/cd/E35328_01/E35332/E35332.pdf
    Check out the VLAN groups section. You must great the VLAN groups before you can assign them to interfaces.

  • IAS 10.1.2-how to configure different oc4j listen to different virtualhost?

    Hi
    I have requirement,
    we have oracle portal based web site that can be used by outside users over the internet.
    And then we have are deploying few new apps/webservices/ear files on a oc4j called core_ws. These web services should not be accessed outside.
    I have created a virtaul host in apache on a different port(7799) which was not exposed to public world.
    But, how to configure core_ws to inform Apache to listen on only port 7799 but not on port 80?
    I tried a diffent route to attack the problem(as mentioned below) which managmenet did not like:
    created location directive, worked in dev but not in production as there ISA sitting front of apache.
    We could apply filter on the URLs of these web services in ISA but my director did not like the idea as each time there is additional web service we have mess with it.
    So, he prefers running these web services on a different port that will not have access to public.
    Appreciate your help if have acheived the same earlier.

    By your description, it sounds like you want to do what is in this My Oracle Support document:
    How To Create Virtual Host Specific OC4J Applications (Doc ID 389819.1)
    https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=389819.1
    (requires login)
    You said you were using 10.1.2, so that will work, its a method of creating separate virtualhosts and using rewrites to direct to error pages if an incorrect request is made. For 10.1.3, but there is a dynamic method which is a better approach.
    ...Ken

Maybe you are looking for