Threads/Multiple classes - how to update progress/error log

I have an application where multiple threads may be running at the same time. Different classes need to update the same error/progress log file. Should I create another class with a static method that takes strings as parameter? And then this static method would write the strings to the log file? What would happen if two threads access the static method at the exact same time? Need guidance.

Write a controller/server to do the updates and have all other threads communitcate with it--do not have al lthreads trying to hit against the same file.
Use logic silimar to a DB with memory caching of writes and having a dedicated writer sending them out to disk.

Similar Messages

  • Help, How to view the error log of oracle Job

    Hi all,
    I created a job in my database, which clears the archivelog. After the job is executed, it occurs error.Such as :
    RMAN清理归档日志 1 问题 2010-3-19 下午03时11分00秒 GMT+08:00 PTDB 数据库实例 SYSTEM RMAN 脚本
    How to view the error log of oracle Job?
    Thank you.
    Eric Zhou

    Hello,
    Besides some views (with the scheduler) that you can get on the link below:
    http://download-west.oracle.com/docs/cd/B28359_01/server.111/b28310/scheduse002.htm#CHDGIDFD
    You may use the LOG parameter with RMAN so as to generate a logfile on the server.
    Also from EM DBConsole (starting with 10g) you may have the RMAN Backup Report.
    Hope this help.
    Best regards,
    Jean-Valentin

  • How to avoid Cost error log  while confirming production order

    Hi
    I dont want to post actual activity cost via production order activity confirmation. But i want standard value keys for my production duration purpose. So,i defined activites(strd value key) in work center without assigning cost center to that work center. While i confirm system throws erro log as Actual cost calculation contain errors and allows me to confirm the activities. I am doing MB31 and all CO settlement activities also. But when i try to close the order it says error log exists,so closing of order is not possible. How to overcome this problem as i dont want to capture any cost of activites via production order,but i want confirmation only for production analysis.

    Sudhar,
    You can make the operation not relevant for Costing by using a Customized Control key which is not relevant for Costing or else in the operation details you need to leave the "Costing relevancy" field blank.
    Regards,
    Prasobh

  • How to update the change log table?

    Hi
    I am doing some manipulation on the ODS records and writing few new records directly into the active table of my ODS. how do i update the change log table so that i can do a delta from my ODS to further data targets??
    i see the fields REQUEST, DATAPAKID, PARTNO and RECORD in the change log table. what values should these fields have for my new records??
    Regards
    Sujai

    Hi,
    Please try this option. In stead of writing directly into DSO, do it in another Custom Z DSO. From there, do the FULL load to your previous DSO. This will ensure that the data consistence through the system. Also, do not forget to delete the data from Custom Z DSO once you successfully loaded the data.
    Thanks,
    Saru
    Edited by: P. Saravana Kumar on Apr 1, 2009 6:23 PM

  • How to check the error log in sharepoint 2013 online (office 365)

    I'm working with sharepoint online instance. I'm developing a sharepoint app using Napa 365 but its giving me some error with the correlation ID. Where i have to check the error log to get the actual error description?
    Please suggest me the right direction.
    Thanks in advance!

    Hi,
    As your environment is SharePoint Online, I suggest you can create a new thread in SharePoint Online forum, you will get more detailed information from there and more experts will help you.
    Office 365 Forum:
    http://community.office365.com/en-us/f/default.aspx
    Thanks for your understanding.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How can I display error log of a standard program in my custom program?

    Hello Experts,
    I have a requirement where I submit a standard program from my custom module pool program as a background job. I use the TO SAP-SPOOL and thus the log is available when I go to SM37 and check the spool list. I have a requirement that I display this log in a tab within my module pool after the completion of the program. I am unable to fins a proper solution to this. I have both the spool number & the log number but I am unable to find function modules which will help me print them within my program. I found many ways to display it but as full screen and not with in my program.
    Could someone please help me with this.
    Thank You

    Hi,
    FM to read a spool request is "RSPO_RETURN_ABAP_SPOOLJOB".
    If the error log is displayed as a list output in the standard program, you can also use the syntax SUBMIT Program... and RETURN with export to memory addition.
    Then you will be able to read the list output from memory.
    Regards,
    Munesh.

  • IPhone Updater - BaseBandUpdater Error [log inside]

    Hi,
    i tried to update my iPhone to 4.3.1 before 6-7 Days.
    Errorcode 1016 i think form Itunes.
    Log-Data:
    perform_baseband_update: requesting data from host
    perform_baseband_update: received data from host (3739469 bytes)
    perform_baseband_update: performing next update stage
    bbupdater: Validating parameters...bbupdater: OK
    bbupdater: !!! bbupdater: [13.-1]:::
    Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    bbupdater:
    bbupdater: !!! bbupdater: Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    send_bbupdate_status: sending baseband update status to host
    perform_baseband_update: failed to perform next stage
    perform_baseband_update: bbupdater error: Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    attempting to dump restore log
    writing log file: /mnt1/restore.log
    Any suggestions how to fix this?
    I have about ~15 Logs of Tries with the same Error.

    Hi,
    i tried to update my iPhone to 4.3.1 before 6-7 Days.
    Errorcode 1016 i think form Itunes.
    Log-Data:
    perform_baseband_update: requesting data from host
    perform_baseband_update: received data from host (3739469 bytes)
    perform_baseband_update: performing next update stage
    bbupdater: Validating parameters...bbupdater: OK
    bbupdater: !!! bbupdater: [13.-1]:::
    Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    bbupdater:
    bbupdater: !!! bbupdater: Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    send_bbupdate_status: sending baseband update status to host
    perform_baseband_update: failed to perform next stage
    perform_baseband_update: bbupdater error: Exception at :0:
        - kBBUReturnError(1)/7: unable to locate firmware file for stage 1
    attempting to dump restore log
    writing log file: /mnt1/restore.log
    Any suggestions how to fix this?
    I have about ~15 Logs of Tries with the same Error.

  • BPC75NW: How to update DataManager debug log

    Hi Experts,
    I am currently implementing scripts conversions in ABAP.
    Question: Through BAdI, how do I write a warning message in DM debug log indicating the list of dimension member values in the log ?
    Regards,
    Pankaj

    Hello,
    Need to check if the signeddata value satisfies a certain condition. If the value satisfies the condition, do nothing, else write a warning in DM debug log specifying the dim member values copying from the in-scope record into the log.
    Regards,
    Pankaj

  • How do I view error logs

    WHen I shutdown, sometimes I see an error pop up quickly as its shutting down. Its too fast to read. I have a weird issue tht when I reboot/shutdown it takes me to the log off screen first, where I then shut down. Like to fix this.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including Wi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Read Error logs after running the background jobs

    Hi,
    How to read the error logs after running the background jobs. In our scenarion we are running the COHV transaction to release the production orders in background. But we are not finding the error logs after background job. We would like to read the error logs and correct for further processing.
    Kindly suggest.
    Thanks & Regards,
    N. Laxman

    Hi
    you can check the  back ground jobs defined by any user in SM37 and where you can see the spool and job logs as well.
    plz check in your case and revert back
    Regards
    Anupam Sharma

  • About error logs...urgent..

    hello experts,
    how will i use error log in my program?
    thank you.:-)

    Hi,
    if there is no data in the table,if we write select statement then error message should be created in 'error log' when it run on background.
    You need to create a Custom table , where you can store the Error Log.say report name and error text , Date of run , user name etc.
    Best is create a Include , which you can use in all reports for future.
    Later you can use the table to retrive log.
    Or you can do in the following way:::::::::::::::::
    You can use the function module  'APPL_LOG_WRITE_MESSAGES' to log application messages and display using FM 'APPL_LOG_DISPLAY'.
      CALL FUNCTION 'APPL_LOG_WRITE_MESSAGES'
        EXPORTING
          OBJECT                    = ls_balhdri-object
        SUBOBJECT                 = ' '
          LOG_HANDLE                = gd_handle
        UPDATE_OR_INSERT          = 'U'
        TABLES
          MESSAGES                  = lt_balmi
      EXCEPTIONS
        OBJECT_NOT_FOUND          = 1
        SUBOBJECT_NOT_FOUND       = 2
        OTHERS                    = 3
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Or You can use the function module 'APPL_LOG_WRITE_MESSAGES' to log application messages and display using FM 'APPL_LOG_DISPLAY'.
      CALL FUNCTION 'APPL_LOG_WRITE_MESSAGES'
        EXPORTING
          OBJECT                    = ls_balhdri-object
        SUBOBJECT                 = ' '
          LOG_HANDLE                = gd_handle
        UPDATE_OR_INSERT          = 'U'
        TABLES
          MESSAGES                  = lt_balmi
      EXCEPTIONS
        OBJECT_NOT_FOUND          = 1
        SUBOBJECT_NOT_FOUND       = 2
        OTHERS                    = 3
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regarding help for why you require and why to go for application logs, refer this SAP Help
    http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa0223493111d182b70000e829fbfe/frameset.htm
    Or you can try in the following way.depending upon your reqt you use any one.
    DATA: ls_log  TYPE bal_s_log.
    DATA: p_log_handle TYPE balloghndl.
    ls_log-extnumber = 'YMYTEST'.
    ls_log-alprog = sy-repid.
    CALL FUNCTION 'BAL_LOG_CREATE'
      EXPORTING
        I_S_LOG                 = ls_log
      IMPORTING
        E_LOG_HANDLE            = p_log_handle
      EXCEPTIONS
        LOG_HEADER_INCONSISTENT = 1
        OTHERS                  = 2.
    IF SY-SUBRC <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    data: l_s_msg TYPE bal_s_msg.
    data: E_MSG_WAS_DISPLAYED type boolean.
    data: E_MSG_WAS_LOGGED type boolean.
    data: E_S_MSG_HANDLE type BALMSGHNDL.
    l_s_msg-msgid = '00'.
    l_s_msg-msgty = 'E'.
    l_s_msg-msgno = '001'.
    l_s_msg-msgv1 = 'This is a test message from 20130810'.
    CALL FUNCTION 'BAL_LOG_MSG_ADD'
      EXPORTING
        I_LOG_HANDLE              = p_log_handle
        I_S_MSG                   = l_s_msg
    IMPORTING
       E_S_MSG_HANDLE            = E_S_MSG_HANDLE
       E_MSG_WAS_LOGGED          = E_MSG_WAS_LOGGED
       E_MSG_WAS_DISPLAYED       = E_MSG_WAS_DISPLAYED
    EXCEPTIONS
       LOG_NOT_FOUND             = 1
       MSG_INCONSISTENT          = 2
       LOG_IS_FULL               = 3
       OTHERS                    = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    data: I_T_LOG_HANDLE type BAL_T_LOGH.
    append p_log_handle to i_t_log_handle.
    CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
    EXPORTING
      I_S_DISPLAY_PROFILE          =
        I_T_LOG_HANDLE               = i_t_log_handle
      I_T_MSG_HANDLE               =
      I_S_LOG_FILTER               =
      I_S_MSG_FILTER               =
      I_T_LOG_CONTEXT_FILTER       =
      I_T_MSG_CONTEXT_FILTER       =
      I_AMODAL                     = ' '
    IMPORTING
      E_S_EXIT_COMMAND             =
    EXCEPTIONS
       PROFILE_INCONSISTENT         = 1
       INTERNAL_ERROR               = 2
       NO_DATA_AVAILABLE            = 3
       NO_AUTHORITY                 = 4
       OTHERS                       = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Please reward if its useful.
    Regards,
    Sivaparvathi

  • Regarding ERROR logs

    Hi,
    I am able to post an order to the HOOK_URL got from the SAP but the order is not getting saved in the SAP or submitted how to see the error log in the SAP SRM . So that i may know the cause of error and move forward with my development.
    THANKS IN ADVANCE
    >> Ajai

    HI,
    I too need to know whats the highest log level and ever we need to set it in SAP SRM to get error logs for my development.\
    Thanks
    Ajai

  • SM35 error log download

    is there an SAP table to download the error log from SM35?  Thanks.
    Moderator message : Not enough re-search before posting. Thread locked.
    Edited by: Vinod Kumar on May 25, 2011 9:27 AM

    Hi,
    Please refer following threads you can get more information regarding error log download for SM35.
    <Link farm removed by moderator>
    Regards,
    Renuka S.
    Edited by: Vinod Kumar on May 25, 2011 9:26 AM

  • How can i use multiple row subquery in update statement

    Hai All
    I using group function in my update statement.. and i need to update more rows so i need to use multiple row
    subquery pls tell me how to use multiple row subquery in update statement
    For example
    while i am using this like this i got an error
    update dail_att set outtime in (select max(r2.ptime) from temp_att where empcode=r2.enpno and
    barcode=r2.cardn and attend_date=r2.pdate group by enpno,pdate,cardn);
    Pls tell me how to use with example
    Thanks & regards
    Srikkanth.M

    Hai Man
    Thanks for ur response Let me clear what i need
    First step Fetch the records as text file and stores into table T1
    and the next step is i have seperated the text using substring and stores in different columns of a table
    There are two shifts 0815 to 1645 and 1200 and 2000
    Here I rep IN and O rep OUT
    Empno date time inout
    001 01-01-10 0815 I
    002 01-01-10 0815 I
    003 01-01-10 0818 I
    001 01-01-10 1100 0
    001 01-01-10 1130 I
    002 01-01-10 1145 0
    002 01-01-10 1215 I
    004 01-01-10 1200 I
    005 01-01-10 1215 I
    004 01-01-10 1315 O
    004 01-01-10 1345 I
    001 01-01-10 1645 0
    002 01-01-10 1715 0
    003 01-01-10 1718 0
    004 01-01-10 2010 0
    005 01-01-10 2015 0
    This is my T1 table i have taken data from text file and stored in this table from this table i need to move data to another table T2
    T2 contains like this
    Empno Intime Intrin Introut Outtime Date
    001 0815 1100 1130 1645 01-01-10
    002 0815 1145 1215 1715 01-01-10
    003 0818 1718 01-01-10
    004 1200 1315 1345 2010 01-01-10
    005 1215 2015 01-01-10
    This what i am trying to do man but i have little bit problems Pls give some solution with good example
    And my coding is
    declare
         emp_code varchar2(25);
    in_time varchar2(25);
    out_time varchar2(25);
    Cursor P1 is
    Select REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    From temp_att
    group by REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    ORDER BY enpno,pdate,ptime;
    begin
         for r2 in p1 loop
    declare
    bar_code varchar2(25);
    begin
    select barcode into bar_code from dail_att where empcode=r2.enpno and attend_date=r2.pdate;
    For r3 in (select empcode,empname,barcode,intime,intrin,introut,addin,addout,outtime,attend_date from dail_att)loop
    if r2.inout ='O' then
    update dail_att set outtime =(select max(r2.ptime) from temp_att where empcode=r2.enpno and barcode=r2.cardn and attend_date=r2.pdate group by r2.cardn,r2.enpno,r2.pdate );
    end if;
    end loop;     
    exception
         when no_data_found then
         if r2.inout ='I' then
                   insert into dail_att(barcode,empcode,intime,attend_date)(select r2.cardn,r2.enpno,min(r2.ptime),r2.pdate from temp_att group by r2.cardn,r2.enpno,r2.pdate );
         end if;
    end;
    end loop;
    commit;     
         end;
    Pls tell me what correction i need to do i the update statement i have used a subquery with group function but when i used it will return only one row but my need is to return many rows and i need to use multiple row subquery
    and how can i use it in the update statement
    Thanks In Advance
    Srikkanth.M

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

Maybe you are looking for