Changing Log Writer

Hello,
Our application uses TopLink with JBoss and Log4J. We are trying to route all TopLink logging into our Log4J logs (this is dynamic and could be a console logger or a file logger). When we are logging to a file, we are using a DailyRollingFileAppender, which changes the log file over every night. It appears that when Log4J closes the log file, renames it and recreates the original, that TopLink doesn't have a valid Writer to the log file. We would like to dynamically set the Writer in TopLink at runtime. Can this be done? Any help would be greatly appreciated.
Jason

Hi,
How exactly do you route toplink logging to log4j?
I think the best way to do it is:
1. write a class Log4JSessionLog that implements oracle.toplink.sessions.SessionLog (and send logging events to a log4j logger)
2. set it as sessionLog for the toplink session.
Log4JSessionLog log4JSessionLog = new Log4JSessionLog()
topLinkServerSession.logMessages();
topLinkServerSession.setSessionLog(log4JSessionLog);
At least that's what I did.
You should give it a try, I'm pretty sure it will solve your problem, since only log4j will be manipulating your log files and not log4j AND toplink.
Maia

Similar Messages

  • Apache Sling Logging Writer Configuration

    Hi,
    I'm having an issue where my custom log writer configuration is not being picked up and used by CQ5 sometimes.  I've created a custom error log writer based on the example provided at http://helpx.adobe.com/cq/kb/HowToRotateRequestAndAccessLog.html which I've installed on an author, replicated it to the publishers, and all seemed ok and working correctly.  The settings are:
    Log File: ../logs/error.log
    Number of Log Files: 5
    Log File Threshold: 200MB
    After installing this, the error logs rotated at 200MB resulting in error.log.0, error.log.1 etc as expected.
    However after rebuilds on the machines, this configuration was overwritten (as expected).  So I've installed and replicated the package again, but now the configuration is not taking effect.  I'm using the exact same config package as I was previously, but the logs don't seem to be rotating at all now (not even daily).  I've deleted the config from the Felix console on all authors and publishers, reinstalled on the authors, replicated to the publishers, then restarted the CQ5 service on all machines, but it's still not working.
    So I have a couple of questions about this:
    Is there somewhere else in CQ5 that might be overriding these log writer config settings?
    Is ../logs/error.log correct for the standard log file location?  A note in step 3 of Creating Your Own Loggers and Writers on http://dev.day.com/docs/en/cq/current/deploying/configure_logging.html states:
    Log writer paths are relative to the crx-quickstart/launchpad location.
    Therefore, a log file specified as logs/thelog.log writes to crx-quickstart/launchpad/logs/thelog.log.
    To write to the folder crx-quickstart/logs the path must be prefixed with ../ (as../logs/thelog.log).
    So a log file specified as ../logs/thelog.log writes to crx-quickstart/logs/thelog.log.
         The configs in the log rotation example also use ../logs.  However when looking at the default/standard logging writer config, it uses logs/error.log.  Which one is correct?
    Any help on what's going on here would be appreciated!!
    Thanks,
    K

    Hi,
    I am answering your last question and this one here only.
    1. Log configuration can be override at project via creating config and overriding factory "org.apache.sling.commons.log.LogManager.factory.config-<identifier>" and writer (if required) "org.apache.sling.commons.log.LogManager.factory.writer-<identifier>". So plz check if you have configure log at project level. Now if you are not able to see then plz recheck you log configuration in felix console http://localhost:4502/system/console/slinglog here you can see entire log configuration for CQ system.
    2. both will work but the location will change
         i. CQ 5.5 - log file located under "crx-quickstart" ../logs/<filename>.log will create under this
         ii. CQ 5.4 - logs creates under "crx-quickstart\logs" also under "crx-quickstart\launchpad\logs" so if you select ../logs/ it will go under "crx-quickstart\logs" only but you can change wherever you want to store. Again you can see this configuration info at http://localhost:4502/system/console/slinglog
    3. You can also customize you log via creating at project level and assigning the "identifire" (with all other configure parameters) for more information you can refer http://sling.apache.org/site/logging.html apart from earlier share links.
    I hope above will help you to proceed. Please let me know for more information.
    Thanks,
    Pawan

  • A function module to add an entry to the change log of the ODS needed

    Hi all,
    I want to add an entry to the change log table of the ODS .
    Is there a Function module available for this or a work around for this.
    Regards
    Akshay

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • How to transfer data in change log table of dso to z-table using abap code

    Hi  can you please explain me how to transfer data in change log table of dso to z-table using abap code ,with out using Function module concept

    PROGRAM NAME:   ZBW_DELTA_TO_GSTAR                                 **
    report ZBW_DELTA_TO_GSTAR no standard page heading
                                     line-size 120
                                     line-count 75
                                     message-id ZBW_MSG_CLS.
    tables:   ZGIV_DLTA_EBV_BB,
              ZGIV_DLTA_EM2_BL,
              ZGIV_DLTA_EM2_BK.
    Selection Screen Definitions
    SELECTION-SCREEN: BEGIN OF BLOCK INNER WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN: SKIP 1.
    PARAMETERS:       EBVBB RADIOBUTTON GROUP ROLL,
                      EM2BL RADIOBUTTON GROUP ROLL,
                      EM2BK RADIOBUTTON GROUP ROLL.
    SELECTION-SCREEN: END OF BLOCK INNER.
    Data:  WS_UPDATE_FLAG  Type C,
           UCounter(9)      Type N,
           ICounter(9)      Type N.
    DATA:  T_ZGIV_DLTA_EBV_BB Type Standard Table of ZGIV_DLTA_EBV_BB,
           s_ZGIV_DLTA_EBV_BB LIKE line of T_ZGIV_DLTA_EBV_BB.
    DATA:  T_ZGIV_DLTA_EM2_BK Type Standard Table of ZGIV_DLTA_EM2_BK,
           s_ZGIV_DLTA_EM2_BK LIKE line of T_ZGIV_DLTA_EM2_BK.
    DATA:  T_ZGIV_DLTA_EM2_BL Type Standard Table of ZGIV_DLTA_EM2_BL,
           s_ZGIV_DLTA_EM2_BL LIKE line of T_ZGIV_DLTA_EM2_BL.
    Standard Internal Tables - Describe usage.
    data: begin of i_AEPSD_O0140 occurs 0.
            include structure /BIC/AEPSD_O0140.
    data: end of i_AEPSD_O0140.
    data: begin of i_AEPSD_O0240 occurs 0.
            include structure /BIC/AEPSD_O0240.
    data: end of i_AEPSD_O0240.
    data: begin of i_AEPSD_O0340 occurs 0.
            include structure /BIC/AEPSD_O0340.
    data: end of i_AEPSD_O0340.
    data: begin of i_GIV_DLTA_EBV_BB occurs 0.
            include structure ZGIV_DLTA_EBV_BB.
    data: end of i_GIV_DLTA_EBV_BB.
    data: begin of i_GIV_DLTA_EM2_BK occurs 0.
            include structure ZGIV_DLTA_EM2_BK.
    data: end of i_GIV_DLTA_EM2_BK.
    data: begin of i_GIV_DLTA_EM2_BL occurs 0.
            include structure ZGIV_DLTA_EM2_BL.
    data: end of i_GIV_DLTA_EM2_BL.
    Miscellaneous Program Variables and Constants.
    TOP-OF-PAGE
    top-of-page.
    START-OF-SELECTION
    start-of-selection.
      Clear: i_GIV_DLTA_EBV_BB,
             i_GIV_DLTA_EM2_BK,
             i_GIV_DLTA_EM2_BL,
             UCounter, ICounter.
      IF EBVBB = 'X'.
        PERFORM 100_EXTRACT_EBV_BB_DELTA_RECS.
      ELSEIF EM2BK = 'X'.
        PERFORM 100_EXTRACT_EM2_BK_DELTA_RECS.
      ELSE.
        PERFORM 100_EXTRACT_EM2_BL_DELTA_RECS.
      ENDIF.
    FORM 100_EXTRACT_EBV_BB_DELTA_RECS
    FORM 100_EXTRACT_EBV_BB_DELTA_RECS.
      Refresh:   i_AEPSD_O0140,
                 i_GIV_DLTA_EBV_BB.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EBV_BB .
      Select * From /BIC/AEPSD_O0140
        Into TABLE i_AEPSD_O0140.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0140.
          MOVE-CORRESPONDING i_AEPSD_O0140 TO s_ZGIV_DLTA_EBV_BB.
          MOVE SY-DATUM to s_ZGIV_DLTA_EBV_BB-create_dt.
          INSERT ZGIV_DLTA_EBV_BB FROM s_ZGIV_DLTA_EBV_BB.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EBV_BB FROM  s_ZGIV_DLTA_EBV_BB.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EBV_BB_DELTA_RECS
    FORM 100_EXTRACT_EM2_BK_DELTA_RECS
    FORM 100_EXTRACT_EM2_BK_DELTA_RECS.
    Refresh:   i_AEPSD_O0240,
               i_GIV_DLTA_EM2_BK.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EM2_BK .
      Select * From /BIC/AEPSD_O0240
        Into TABLE i_AEPSD_O0240.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0240.
          MOVE-CORRESPONDING i_AEPSD_O0240 TO s_ZGIV_DLTA_EM2_BK.
          MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BK-create_dt.
            INSERT ZGIV_DLTA_EM2_BK FROM s_ZGIV_DLTA_EM2_BK.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EM2_BK FROM  s_ZGIV_DLTA_EM2_BK.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EM2_BK_DELTA_RECS
    FORM 100_EXTRACT_EM2_BL_DELTA_RECS
    FORM 100_EXTRACT_EM2_BL_DELTA_RECS.
    Refresh:   i_AEPSD_O0340,
               i_GIV_DLTA_EM2_BL.
      Clear:      UCounter, ICounter, s_ZGIV_DLTA_EM2_BL .
      Select * From /BIC/AEPSD_O0340
        Into TABLE i_AEPSD_O0340.
      IF SY-Subrc = 0.
        LOOP AT i_AEPSD_O0340.
          MOVE-CORRESPONDING i_AEPSD_O0340 TO s_ZGIV_DLTA_EM2_BL.
          MOVE SY-DATUM to s_ZGIV_DLTA_EM2_BL-create_dt.
            INSERT ZGIV_DLTA_EM2_BL FROM s_ZGIV_DLTA_EM2_BL.
          IF SY-Subrc = 0.
            ICounter = ICounter + 1.
          ELSE.
            UPDATE ZGIV_DLTA_EM2_BL FROM  s_ZGIV_DLTA_EM2_BL.
            IF SY-Subrc = 0.
              UCounter = UCounter + 1.
            ELSE.
              Message E067 with SY-DATUM ' ' SY-UZEIT ' '.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "100_EXTRACT_EM2_BL_DELTA_RECS
    END-OF-SELECTION
    end-of-selection.
      perform D1000_REPORT_DATA.
    D1000_REPORT_DATA
    form D1000_REPORT_DATA.
    *Display the title of the program
      write: /25 SY-TITLE.
      skip.
    Diaplay the details of the user and time
      write: /1 'Executed by', 15 SY-UNAME, 30 'Date',
      38 SY-DATUM, 53 'Time', 60 SY-UZEIT.
      skip 2.
      write: /  'Delta Records have been extracted  ',
             /   'Updates : ', UCounter,
             /   'Inserts : ', ICounter.
      skip.
      skip 3.
      write: /20 'End of the report'.
    endform.                                           "D1000_REPORT_DATA
    chgeck it out this also may hep you

  • Change log

    Hi,
    Is there any difference between the programs RSTBHIST ( Table history) and RSVTPROT(Evaluation of log changes)?
    regards,
    Beena

    RSTBHIST
    Description
    You can record changes to table contents in the SAP System.
    For each change to a table entry, a change document is written in the table log database. The change document contains information such as time of the change and name of the user who made the change.
    Using the service functions, you can generate a list of all the change documents of the current day or a chosen time period.
    Furthermore you can display a list of all the tables, for which change documents are written (i.e. all tables with history administration).
    The administration of the table log database is supported by various functions:
    Determining the number of change documents in the table log database
    It is possible to select by time period and by table.
    Deletion of the oldest change documents from the table log database
    Enter a key date.
    You can select by table. Be careful: After deletion, the change documents are no longer available.
    Archiving of the oldest change documents
    Before deletion from the table log database, the change documents are archived in a sequential file.
    Creation of change documents
    Change documents are written for a table if:
    the table has the technical setting Logging
    the function Write change documents is active in your system
    To find out whether a table has the feature Logging, either choose the service function Tables with history administration or perform the following functions beginning with the main menu:
    Tools -> CASE -> Development -> Data Dictionary -> Display -> <tabe name> Display -> Goto -> Techn. setting
    The function Write change documents is controlled via the profile paramter rec/client. The following is possible:
    rec/client = OFF --> Function inactive
    rec/client = ALL --> Function active
    rec/client = <md1>,... --> Function active for chosen clients
    Comparison of current status with history
    For tables with change logging, it is possible to perform a comparison of the current status with the contents of the table at an earlier time.
    The table contents at both times are compared. Various field contents are highlighted.
    You can switch the display from vertical split (objects alongside one another) to horizontal split (objects below one another).
    RSVTPROT Evaluation of change logs
    Rgds,
    SaiRam

  • Change log for CRM service order

    Dear Experts,
      I've created log profile in CRM under IMG path Customer Relationship Management->Basic Functions-> Change log with protocolo " Changed document "  & segment " PRICING_I ". This log profile is attached to transaction type service order.
    Basic idea is to capture the changes made on the pricing in service order. Now with this setup where can i see the trace of changes done in service order. Is there any table that fills with the log  ? 
    Basically i'm trying to find log DB table for pricing with this setup.Can anyone pls suggest me to resolve the issue.
    Regards
    Devika.S

    Hi,
    there are no change logs for CUMULAT_H object because this is only a temporary object in CRM Order buffer. Check for example the function module CRM_CUMULAT_H_READ_OB. You will find out the this module does not read the CUMULATE_H from the DB cumulates the values by reading the item values.  Because of that you will also see that in view CRMV_OBJECTS the change document relevance is not maintained for this object.
    So you will not a change entry for CUMULAT_H in CDHDR/CDPOS. As a workaround for your requirement you can read the changes of CRMD_PRICING_I-NET_VALUE from the change document tables or write a change entry on save into a customer field and/or table.
    Regards
    Nicolai

  • Log writer taking more time to write

    Hi All,
    we have oracle 10g(10.1.0) installed on rhel 5.3.. We are facing an issue regarding the logwriter..the logwriter is taking more time to write to the online redolog file...the trace file shows a warning message as " log writer time 840ms" ... Not sure what is the root cause of it..Please help me out in that regards..Thanks in advance...

    imran khan wrote:
    The archived log mode is disabled for the db..The online redolog files are not in FRA instead they are kept in diskgroups (multiplexed in two disk groups)..The controlfiles and datafiles are also stored in the same location as of online redolog files.The db is having the release as 10.2.0.4.0 and all the components are in 10.2.0.4.0 as well.
    I also found that the ASM instance is having the release as 10.2.0.4.0(v$version view) but the compatibility attribute of the diskgroups is 10.1.0.0 . The compatible parameter in ASM instance shows 10.2.0.3.0 .
    Do i need to change the compatibility of the diskgroups and the compatible parameter to 10.2.0.4.0 in ASM instance?
    Not sure whether ASM compatibility makes any impact on delaying the lgwr to write to the online redolog files ?
    Note : The online redolog files are stored in ASM diskgroups
    please suggest...If your redo is in the same physical location as your datafiles, don't you think there might be some contention? (For my OLTP type of experience, undo is the most hit data file, too).
    There could also be some more fundamental thing wrong, such as misconfigured I/O, and your redo just seems small. How often are they switching? Are you using hugefiles (as opposed to configuring them and unknowingly not using them)? Do you see any actual swapping to disk going on?
    You likely have an OS I/O problem, but appear to only be looking at Oracle's view of it. What does the O/S say about it?
    Are you sure you want to be running a production database without archive logging?

  • User change log report in Console

    Dear Experts,
    We have one audit requirement. We need u2018change logu2019 for useru2019s role modification.
    I checked in console logs. I found the log for delete user & modify user. In case of delete user it is giving details which are the users had been deleted. But in case of role modify in user, it is not giving which are the users had been modified or which newly role had been assign.
    We need change log report from MDM console.
    Regards,
    Gaurang

    Hi Gaurang,
    <repositoryAdmin><role action="modify" id="2"><functionRight>
    <function>16777216</function><access>1</access>
    </functionRight></role></repositoryAdmin>
    In this case the role with ID 2 has been modified. The authorization with ID 16777216 (see function ID map below) has been set to 1 (Execute).
    Below this section there is one table with function ID and Description.
    Here in case of change in functions Tab
    <access>X</access> will tell u if the function is set to Execute or None:
    Legends:
    Execute:1
    None:0
    and which function u will get from <function>16777216</function>
    For decoding the function id there is a table given in section 4.2
    and if there is any change in the table and fields tab:
    then log will be as follows:
    <repositoryAdmin><role action="modify" id="5"><objectRight> <object>1</object><type>0</type><access>2</access>
    </objectRight></role></repositoryAdmin>
    where access will tell u if its Read Write(3) or Read Only(2)
    Which table u will get from <object>ID</object>
    Now this role ID and Table ID is the Index values which u can get using API.
    Try to write an api which will extract the Table ID ,Field ID and Role ID information in an Excel this u can use as reference the decode the Log.
    Regards,
    Neethu Joy

  • Replication between change log

    We are trying to implement replication on change log suffix between 2 SunOne directory servers. Currently, the replication is setup and to test the same, we tried to make a change on one particular server. I noticed that the change was being created with 2 change numbers on the actual server where the change was made & had 1 entry in the changelog of the replication server. Is that the expected behaviour? We were expecting the changeNumber for both the servers to be in sync. How do we achieve that?
    Thanks in advance

    The replication protocol has ways of determining order. The csn has timestamps in it as well as the replica from which a change originated. It's far too detailed to write here and I'm not sure I'm even allowed to do it. If there is a specific instance or case in where replication is not working properly, then we might have something to talk about.
    In summary, my suggestion is to not replicate the changelog suffix. Each changelog is for that database of that instance only.

  • SAP Report RSVTPROT: Evaluate Change Logs

    Is there a similar report that anyone knows of to evaluate change logs? A report where you can enter a user name or user range, and a range for table names?
    Or has anyone customized the SAP logic to do this?
    We have a very old customized program from this but looks like because of advancements in change log processing we are having a lot of new issues with it.
                         Thank-You.

    Hi,
    Perhaps you can write custom program to access directly table DBTABLOG which contains all records for table log (very huge table)
    Also check FM DBLOG_READ_TABLE for logic to access.
    Regards,
    Ferry Lianto

  • Problem in uploading data from psa to active data and change log dso.

    hi experts
    my data from psa is coming to new data dso but not to active data and change log dso. can you please help me out...

    Uday,
    Please select the request from Manage screen of DSO and click on Activate, pop-up comes again select the request and click on Start. ( If it is Standard DSO ).
    In case of Write optimized DSO you need not to activate it.
    Regards,
    Ramkumar.

  • Change Log table Data

    Hi
    I have a ODS in which the active records are 608423.
    And when i look into the Change log table the records are 1216846 with the status new (N) and 1108438 with status (X) and 1108438 (with status ' ' ).
    I did a full load and a delta and this is a Over write ODS. I am little confused with this logic, how it put  exactly the double number of records with status (N) in the change log when compared to the active table. 
    Thx
    Thejo.

    Hi Thejo,
    If you changed a key figure then in the change log you'll see one storno (with minus) record for an old KF value and a new record with a new KF value.
    Best regards,
    Eugene

  • Change Logs for TCODE -- FILE

    Hi Friends,
        Please help me in finding the change logs  for the TCODE  FILE,
        i.e  The changes made to the Logical paths
       I had tried  Utilities---->change logs , but unfortunately i cannot find any changes logs
       But there are changes made to the logical paths in my system but i cannot see them in change logs
    thanks
    chandrasekhar j

    rec/client is a profile parameter, you can view the settings in transaction RZ10.  However I find program RSPARAM more useful, the report lists all system parameters with their default and altered value.  Also if you double-click on a parameter you can get to the full help text for its meaning.
    The parameter essentially switches on table change logging for configuration tables (based on the technical settings of the table) and has to be set before the changes are made.
    Hope this helps.
    Nick

  • Change Log Data from DSO to CUBE

    Hi Experts,
      Is it possible to load/transfer change log data as well from DSO to Cube
    Thanks

    Hi,
    Yes it is possible.
    Create a DTP from DSO to cube.
    In the extraction tab of DTP choose the option
    Datasource Change log
    Hope it Helps!!
    Reward if useful
    Manish

  • Filled fields become blank in DSO change log

    Hi experts,
    I find an unusual behavior in DSO activation.
    For some records for which I find in PSA, new data table (and in debug also!!!) correct data, when the request is activated I find in change log table all characteristic fields empty; the key fields and key figure fields are ok and correct in all tables.
    It happen randomly for some orders and for a few requests.
    It happen when I have one storno record, for example:
    PSA (order, item, customer, material, storno, quantity)
    10000, 10, AAA, YYY, , 25
    10000, 10, AAA, YYY, X, -25
    DEBUG (order, item, customer, material, storno, quantity)
    10000, 10, AAA, YYY, , 25
    10000, 10, AAA, YYY, X, -25
    CHANGE LOG (order, item, customer, material, storno, quantity)
    10000, 10, AAA, YYY, , 25
    10000, 10, , , X, -25
    ACTIVE DATA (order, item, customer, material, storno, quantity)
    10000, 10, AAA, YYY, 25
    In some other cases:
    ACTIVE DATA (order, item, customer, material, storno, quantity)
    10000, 10, , , -25
    Have you some ideas? It is very strange.
    We are on a 7.0 BW system, but with 3.5 data flow (update rule).
    Thanks in advance.

    Vito,
    This happens some times...
    1. Did you transport any change to this DSO where characteristics were added and are these the ones that are blank...
    When this happens - see if you can clear the change log ( if this is an option ) and then reactivate the cube.
    Also there is a program to regenerate the activation program, I am not able to locate this - but then usually reactivating the ODS will usually clear this issue because it regenerates the activation program.

Maybe you are looking for