Application Logging Using ADFLogger

Hi All,
I have some things to clarify about ADFLogger. Currently I am using JDev 11.1.2.0.0.
1. How can we customise the Message pattern. Can I add more patterns to Message(e.g: Added "Logged user of the Application" for the logging message)
2. How Can I define file appender for logger. Can I add DailyFileAppenders etc as it in Log4j.
3. Can I change the Logging Configuration without redeploying the product. If so, please tell how to do this.
In my scenario, I need to log messages in separate file in Daily Basis. Such that every day it creates a new log file for logging messages and Archive the log files.
and I need to customize the message pattern and add the logged user of the Application.
If those can be implemented, Please guide me how to do this.
Thanks
Dk

To modify the log messages you have to use your own log formatter class. Check out http://tompeez.wordpress.com/2011/09/23/adflogger-using-a-custom-formatter-class-to-print-log-messages/ to get started.
You can change the logging on the server (and the embedded server) at runtime. On the server it's best to use the Enterprise Manager which offers visual configuration of the loggers. Here you can change the logging to a daily file too.
Timo

Similar Messages

  • Performance Impact for the Application when using ADFLogger

    Hi All,
    I am very new to ADFLogger and I am going to implement this in my Application. I go through Duncan Mill's acticles and got the basic understanding.
    I have some questions to be clear.
    Is there any Performance Impact when using ADFLogger to slower the Appllication.
    Is there any Best Practices to follow with ADFLogger to minimize the negative impact(if exists).
    Thanks
    Dk

    Well, add a call to a logger is a method call. So if you add a log message for every line of code, you'll see an impact.
    You can implement it in a way that you only write the log messages if the log level if set to a level which your logger writes (or lower). In this case the impact is like having an if statement, and a method call if the if statement returns true.
    After this theory here is my personal finding, as I use ADFLogger quite a lot. In production systems you turn the log lever to WARNING or higher so you will not see many log messages in the log. Only when a problem is reported you set the log level to a lower value to get more output.
    I normally use the 'check log level before logging a message' and the 'just print the message' combined. When I know that a message is printed very often, I first check the level. If I assume or know that a message is only logged seldom, I just log it.
    I personally have not seen a negative impact this way.
    Timo

  • Custom error message in SAP application log

    Is there a way to add a custom error message to the SAP application log without passing the message variables MSGV1, MSGV2, MSGV3, MSGV4 and the Message class and number. 
    We want to pass a custom message from the BAPIRET2-MESSAGE without giving it a Message class and number.  The reason for this is that  we are using class based exceptions instead of the traditional message class with errors.  When we catch the class based exception, we take the error text of the exception and put in in the BAPIRET2-message and set the BAPIRET2-TYPE as 'E'.  Now we want to add this to the SAP application log.
    The call to 'BAL_LOG_MSG_ADD' takes a structure BAL_S_MSG which is just like BAPIRET2.  However this function builds the entry to the application log use the message variables MSGV1, MSGV2, MSGV3, MSGV4.  There is no provision to pass in the BAPIRET2 message.
    Add message to application log
      CALL FUNCTION 'BAL_LOG_MSG_ADD'
        EXPORTING
         i_log_handle              = app_log_handle
         i_s_msg                   = log_message
    Thanks,
    Jay

    Hi Jay,
    Did you see <b>BAL_LOG_EXCEPTION_ADD</b>?
    This FM is represented by the structure <b>BAL_S_EXC</b>. This can have various versions as described below:
    <b>Data of BAL_S_EXC Structure  /     Use</b>
    <b>EXCEPTION</b>  /                              Exception class from which an exception text 
                                                       is added to the log. This field must be filled.
    <b>MSGTY</b>  /                                     Message type (MSGTY) of a T100 message.
                                                       This field must also be filled for exceptions.
    <b>PROBCLASS,
    DETLEVEL,
    ALSORT, TIME_STMP</b>  /                Message or exception attributes, such as
                                                        problem class (PROBCLASS, for
                                                        example, "very important"), level of detail
                                                        (DETLEVEL, from 1 to 9), sort criterion
                                                        (ALSORT, unrestricted) and timestamp
                                                        (TIME_STMP). These fields can be displayed
                                                        in the log (except TIME_STMP).
    <b>MSG_COUNT</b>   /                            This attribute is not used for exceptions.
    Follow the link below for more details:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d6/5d7f38f52f923ae10000009b38f8cf/frameset.htm">SAP Help DOc</a>
    Hope this helps.
    Thanks
    Sanjeev

  • Error/Application Logs

    I have a scenario in which I have to display error logs when exception occurs.
    There is a transaction SLG1 where you can see all the application log for a particular process. Has anyone worked on calling these types of transactions to display error or application logs. If so, please throw some light on this.
    Thanks a lot
    Deno

    Hi Deno,
    If you want to see the error message in SLG1. Follow the following steps:
    1.  Use the FM BAL_LOG_CREATE to create the application log.
    2.  Use the FM BAL_LOG_MSG_ADD to add the message to the application log.
    3. Save the application log using FM BAL_DB_SAVE.
    Now you can see your error message in the SLG1 transaction.
    <b>Reward points if it helps.</b>

  • SAP Application Log

    Hi All,
         The requirment is to create a Standard SAP Application Log using a Function module 'BAL_LOG_CREATE' and each successfull work order update should create a message in the log using FM 'BAL_LOG_MSG_ADD'. Each failed work order update should result in a exception being added to the log using BAL_LOG_EXCEPTIOn_ADD'.
       please guide me on how these FM's should be used for creating the Standard SAP Application log.
    Thanks in Advance.

    hi tina,
    please give specific SAPGUI you're using. Is it SAPGUI for Windows or SAPGUI for Java ?
    If you're using SAPGUI for Java on Linux, you can refer here (http://sapbasis.wordpress.com/2007/08/22/installation-and-configuration-of-sapgui-for-java-on-linux/)
    ardhian
    http://ardhian.kioslinux.com
    http://sapbasis.wordpress.com

  • Application Log - error in header

    Hi,
    I have created application log using BAL* FM's.
    Now in header part i am filing below columns:
    as_log-context-tabname = 'YCONTEXT'.
    as_log-context-value = ls_extnumber.
    When log is displayed, in header i am getting information:
    Interface type(custom field), Numb, date, Time, User, Tran, Program,Mode, Log number.
    Below Inrterface type there is a folder 'Inbound'(again name is as per requiernment).  Now this folder is a tree like structure.
    When this tree is expanded, fields Bumb, date,time,User.. gets there values.
    Now the problem is:
    below folder 'Inbound', there is a symbol indicating error messages. I want with this error message, some text should also come.
    How to do this?
    If someone can provide his/her email id, i can send the screen shots, which will be easier to understand.
    regards,
    Ashish

    Hi Sai,
    Is there any recent Kernal upgrade has happened in your project? the issue is happening in the VMC call as per the dump detail. I would suggest just ask the basis guys to check the VMC server wether it is up or down and also in case of any upgrade happen basis need to restart the VMC server may be they have forgotten to do so.please check the same and revert with your finding.
    Thanks
    Prem

  • Problem while using ADFLogger to separate serverlogs and application logs.

    I am facing one problem with ADFLogger, when I create my own custom logger as I want my log file should be separate and
    it should not contain server logs with it.
    and also I don't know how to change the format of logs while using ADFLogger?

    I have opened logging.xml and In structure window, I expanded log-handlers and I checked for log_handler with name ‘odl-handler’
    and then I created a copy of existing odl-handler and changed the name from odl-handler to some custom name xyz-handler.
    in the property called path, and then I changed the default name ${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log
    to ${domain.home}/servers/${weblogic.Name}/logs/xyz-diagnostic.log file.
    and then I created a Backing Bean and used info and error message of ADFLogger class
    and finally i added mine package in logging.xml and then I added console-handler and mine xyz-handler for it. Then custom log file was created but it was empty and i was able to see console logs?
    Can u please tell me i was not able to see logs in my custom file.

  • Any guidelines using RSAL_LOG_WRITE to post message in the application log

    Hi SDN!
    I've programmed a rather complex extractor. As most you will know, the real test is when the extractor goes live in productions;-) So in order to be able to check if everything works as designed - I've customized the extractor in order to post more or less entries in the application logs - This setting can be alterered in the uses system directly.
    I've tested the functionality using RSA3 and the application log is filled as expected. The Application log object is RSFH and everything shows up fine. When tring to use it from BW - The application log gets no entries under object RSAP (Where they normally will end up).
    I'm using the function module RSAL_LOG_WRITE to add entries to the same log as the macroes LOG_WRITE uses.
    Does anybody have any experiance adding entries to the standard application log in the source system when extracting data into BW?
    Best Regards
    Søren Hansen

    Sorry Arkesh,
    I to don't know that how to install the jar files, actually thats the role of BASIS guys.
    Watch the below threads for which jar files we need to deploy and how to deploy the jar files
    Re: Required jar files for using jdbc adapter
    Re: Error in JDBC adapter

  • After updating to mavericks I have to constantly enter my apple ID for mail, iBooks, iTunes and many other applications that used to be part of my keychain. How can I get my log-in to work again?

    After updating to mavericks I have to constantly enter my apple ID for mail, iBooks, iTunes and many other applications that used to be part of my keychain. How can I get my apple ID log-in to work again?

    Several times I've re-entered my passwords under Preferences/Internet Accounts/iCloud and it won't save since I've installed Mavericks.  Also, the iCloud icon in the left column in Preferences/Internet Accounts/iCloud is greyed out but allows me to click on it to set-up.  When I click on iCloud the password is filled out but the "Enable this account" check-box is not checked.  I check it, and all seems correct.  The icon is no longer grey, the password is correct, the "activate this account" check-box is checked.  Then, when I launch mail, notes etc. I'm still prompted to re-enter my apple ID.  The log-in loop continues.  For years my keychain has worked perfectly.  What has changed in Mavericks?

  • What are F. M's used for creating application log in application server

    Hello
    plz suggest which F.M's i have to use to create application log
    Regards
    Kanth

    Hi Kanth,
    You can go through the following Function Modules :
    Application Log Maintenance
    (i)APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
    (ii)APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
    (iii)APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
    (iv)APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
    (v)APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
    (vi)APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
    (vii)APPL_LOG_SET_OBJECT With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the
    (viii)APPL_LOG_WRITE_u2026 messages are written in local memory or are output on the screen.
    (ix)APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
    (x)APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
    (xi)APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
    (xii)APPL_LOG_WRITE_MESSAGE_PARAMS With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like
    (xiv)APPL_LOG_WRITE_SINGLE_MESSAGE.
    (xv)APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
    (xvi)APPL_LOG_WRITE_SINGLE_MESSAGE With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
    Regards,
    Swapna.

  • Who uses Application Logs?

    Hey there, I just wanted to understand more about the usage of application logs.  Do any of you use it for debugging/analysis purposes of your applications?  For those that use it, would you mind explain how you use it etc.
    Sorry, I'm pretty much an ABAP newbie.

    I used Application Logs to get errors or other messages for RFC Calls etc in most of my Custom BAPIs.
    See this\
    http://help.sap.com/saphelp_nw04/helpdata/en/3a/c8263712c79958e10000009b38f936/content.htm
    It doesnt help you much but definetly gives you some idea.
    There are a bunch of function modules to help in getting Application Logs. Theoritically an Application Log is similar to System Log. But System Log is for the whole SAP system where are an Application log is specific to the Custom Object (and sometimes even sub-object) that you create and assign to.
    Pros: If improves performance by reducing number of database hits and writing the logs locally.
    Cons: A lot of effort is needed for initial setup.
    If this helps, award points suitably.

  • WDA - Contrast Using Message Manager & Application Logs

    Hi there, I'm trying to figure out when it is appropriate to use each.  Thus far, it seems that the conclusion that I am coming upon is that the message manager is used for issuing messages at an application user, whereas the application logs should be used to address issues meant for an administrator of the application - basically someone who may be more technical.  How is this assumption?  Can someone provide me with more inside.  I'd love to understand some real life usages.   I've read documentation after documentation, but in short, it would be great to leverage off of some who have actually used this in practice.
    Thanks in advance.

    Hi Michael
    > Thus far, it seems that the
    > conclusion that I am coming upon is that the message
    > manager is used for issuing messages at an
    > application user, whereas the application logs should
    > be used to address issues meant for an administrator
    > of the application - basically someone who may be
    > more technical.
    As I can see from my point of view the main area of using IWDMessageManager is to indicate to user what is wrong with data he or she is trying to change over UI. For example, to show message "The field XXX must not be empty" or to make another kind of validation of input data on UI level.
    The main purpose of logging is to trace possible Java exceptions, to trace debugging information (with severity DEBUG), to log some critical errors for technical staff or administrators. The information from the logs can be unhelpful for end-user.
    BR
    Sergei

  • How to use Application log (slg0 & slg1)

    Hi all,
    Can u please give me some hints to utilize Application log?
    Hope you will help me.
    Thanq in advance,
    Bye.

    hi John,
       Check these FM's out
    BAL_GLB_SEARCH_LOG            
    BAL_LOG_CREATE                
    BAL_LOG_EXC_ADD               
    BAL_LOG_HDR_CHANGE            
    BAL_LOG_HDR_READ              
    BAL_LOG_MSG_ADD               
    BAL_LOG_MSG_ADD_FREE_TEXT     
    BAL_LOG_MSG_CHANGE            
    BAL_LOG_MSG_CUMULATE          
    BAL_LOG_MSG_DELETE            
    BAL_LOG_MSG_DELETE_ALL        
    BAL_LOG_MSG_READ              
    BAL_LOG_REFRESH               
    SBAL_DETAIL                    Application Log: Display: Detail Screens                              
    BAL_DSP_LOG_PARAMETERS         Application Log: Display: Display log header parameter set            
    BAL_DSP_LOG_TECHNICAL_DATA     Application Log: Display: Display log header technical data                                                                               
    SBAL_DISPLAY                   Application Log: Display Log                                          
    BAL_DSP_LOG_DISPLAY            Application Log: Fullscreen log output                                
    BAL_DSP_LOG_PRINT              Application Log: Print log                                                                               
    SBAL_PROFILE                   Application Log: Display Profile                                      
    BAL_DSP_PROFILE_SINGLE_LOG_GET Application Log: Display profile: Standard profile (SLG1) for one log                                                                               
    SBAL_SERVICE                   Application Log: Service Functions                                    
    BAL_LOG_HDR_CHECK              Application Log: Log: Header data: Check                              
    BAL_LOG_MSG_CHECK              Application Log: Log: Message: Check                                                                               
    SBAL_TOOLBOX                   Application Log: Toolbox                                              
    BAL_DB_LOGNUMBER_GET           Application Log: Database: Get internal log number from number range  
    BAL_LOG_DELETE                 Application Log: Log: Delete log (from DB also at save)               
    BAL_LOG_EXIST                  Application Log: Log: Check existence (in memory)                     
    BAL_LOG_MSG_EXIST              Application Log: Log: Message: Check existence (in memory)            
    BAL_LOG_MSG_REPLACE            Application Log: Log: Message: Replace last                           
    BAL_STATISTICS_LOG_GET                                                                               
    BAL_STATISTICS_LOG_SET                                                                               
    Regards,
    Santosh
    Note: Reward Points if helpful

  • Error Message in portal application.log

    Hi all,
    There are error messages continually been written to application.log.
    Here is the path.
    $ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log
    We couldn't find out what's wrong.
    Portal Version is 10.1.2.2.0.
    application.log
    07/01/31 16:54:54 portal: [module=RepositoryServlet, ecid=103102642203,1] ERROR: Repository Gateway error: Request Processing Error:
    maxlength.htc: PROCEDURE DOESN'T EXIST
    07/01/31 17:23:44 portal: [module=RepositoryServlet, ecid=133169185626,1] ERROR: Repository Gateway error: Request Processing Error:
    maxlength.htc: PROCEDURE DOESN'T EXIST
    07/01/31 17:23:58 portal: Broken pipe
    07/01/31 17:23:58 portal: Broken pipe
    07/01/31 17:23:58 portal: id=146054097151,1 Exception processing portlet response
    java.lang.ArrayIndexOutOfBoundsException
         at java.lang.System.arraycopy(Native Method)
         at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:216)
         at com.evermind.server.http.EvermindServletOutputStream.write(EvermindServletOutputStream.java:151)
         at oracle.webdb.repository.service.RepositoryHttpResponseWrapper$RepositoryOutputStreamWrapper.write(Unknown Source)
         at oracle.webdb.page.CharConvertingOutputStream.write(Unknown Source)
         at oracle.webdb.page.v2.BaseDataProcessor.addToOutputStream(Unknown Source)
         at oracle.webdb.page.v2.BaseDataProcessor.includePortlet(Unknown Source)
         at oracle.webdb.page.v2.BaseDataProcessor.parseLayout(Unknown Source)
         at oracle.webdb.page.v2.BaseDataProcessor.assemblePage(Unknown Source)
         at oracle.webdb.page.v2.BaseDataProcessor.process(Unknown Source)
         at oracle.webdb.page.PageBuilder.process(Unknown Source)
         at oracle.webdb.page.Main.doRequest(Unknown Source)
         at oracle.webdb.page.ParallelServlet.doGet(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:260)
         at oracle.webdb.portal.servlet.PortalServlet.doGet(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:834)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    ----------------------

    $ORACLE_HOME/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island_1/application.log
    os the log of the "parent application". This is rather high level in the container. The message in the logfiles tells you that a procedure doesn't exist.
    This can mean 3 things:
    1. The procedure really doesn't exist
    2. The procedure expects different parameters then passed
    3. In the procedure a specific array member is called (but not found). (don't know how to explain this better in English, sorry for that).
    It has been a while since I touched portal. In the past portal used a DAD (located in your HTTP-Server configuration). By changing the error style of the dad, you might find a more comprohensive error message.

  • How to add custom error message in standard application log of change doc.

    Hi,
    While saving chnage document I need to add raise an error on specific condition. As Error messages is being shown in application log I added custom message in include LCRM_1O_UIF15 by using BAL_LOG_MSG_ADD FM however it is not showing in the screen. What could be the reason? Can anybody please explain?
    Rgds
    Sudhanshu

    Muhammed,
    Have you tried throwing a JboException in your AM code?
    John

Maybe you are looking for

  • IMac HD replacement

    Hi, I have an iMac 24" 3.06ghz early 2008 iMac that I'd like to upgrade the HD. Can I use the Western Digital WD20EARS 2TB drive to replace it? Would it work or is there a more appropriate drive for my iMac? Thank for helping. Tahitiwaves

  • Java Editor with the HelloWorldServlet does not open

    I am following the Getting Started guide lines. When choosing Finish in step 6 of "Create a HelloWorld Servlet" (https://help.hana.ondemand.com/help/frameset.htm?e5a8b1d3bb571014a0f89bb4706d4e0b.html) then the Java Editor should open. Unfortunately t

  • Open cursor for string and select from partition (cannot bind)

    Hi, i don't manage to use a bind variable for a select ... from ... PARTITION(...). It doesn't work to use something like open cur for 'select ... from ... PARTITION(:1) where ...' using 'NDAY_20120301';So i have to create the cursor string with stri

  • Mac OS X Lion, Photo Booth crashes on startup

    I just installed Mac OS 10.7 Lion on my MacBook Pro and Photo Booth crashes at startup every time I open it. It is the only application I have been having issues with so far. Anyone else having the same issue? Or anyone know any solutions?

  • Qosmio F10 with replaced mainboard: Where can I find the right drivers?

    Hello guys, Toshiba service replaced the board with a new one including a geforce 6600 gpu on my F10. So, now I formated the laptop and I want to put again back everything to work. But I see now that there are some different devices, like the 6600go