Log4j - logging to multiple files

Hi,
Is there a way to do this? I have a class in a shared package in which I want to log into a separate log file.
I'm using the text configuration file - not the xml one.
I tried this (a suggestion from google):
log4j.rootLogger = ERROR, WebLog
log4j.category.se.aftonbladet.elitserien=ERROR
log4j.category.org.apache.struts2=ERROR
log4j.category.org.apache=ERROR
log4j.category.catalia=ERROR
# An extra category to a log file
log4j.category.AlternativeLog=A3
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold = DEBUG
log4j.appender.stdout.Target   = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L] : %m%n
log4j.appender.WebLog = org.apache.log4j.RollingFileAppender
log4j.appender.WebLog.file = /opt/tomcat/logs/elitserienservice.log
log4j.appender.WebLog.MaxFileSize=2048KB
log4j.appender.WebLog.MaxBackupIndex = 5
log4j.appender.WebLog.layout = org.apache.log4j.PatternLayout
log4j.appender.WebLog.layout.ConversionPattern = %d{ISO8601} %-5p [%F:%L] : %m%n
# A3 is set to be a FileAppender which will log all actions in the application.
log4j.appender.A3=org.apache.log4j.RollingFileAppender
log4j.appender.A3.file=/opt/tomcat/logs/elitserienservice_alt.log
log4j.appender.A3.MaxFileSize=2048KB
log4j.appender.A3.MaxBackupIndex = 5
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%d{ISO8601} %-5p [%F:%L] : %m%nAnd in my class I get my logger like this:
private static final Logger logger = Logger.getLogger("AlternativeLog");But it doesnt work. All logging still ends up in the 'elitserienservice.log'.
Any help much appreciated!
/best regards, Håkan Jacobsson

log4j loggers/categories are additive by default. If you write a message to the "AlternativeLog" logger, log4j will first pass that message to all appenders that are attached to the "AlternativeLog" appender. After that, log4j will pass that same message to all appenders that are attached to any 'parent' loggers/categories. In your example, the only 'parent' logger above the "AlternativeLog" is the root logger.
To alter this behavior, you'll need to set the additivity property to false on the "AlternativeLog" logger. Something like this should do the trick:
log4j.additivity.AlternativeLog=false
FYI... For better responses to log4j inquiries, you should post your questions to the log4j users mailing list ([email protected])
http://logging.apache.org/mail-lists.html

Similar Messages

  • Beginner - How to log using multiple files

    I am in trouble when I try to record the produced data into multiple files. There is a Rec button that is used to start to log the data that is produced by the system.
    As you can see in the attached image.
    The problem is that the user can stop the data logger and then start it again. And so, I need to create a new file. I configured the "write to measurement file" to save data into multiple files, but, it is appending the data into the file created before.
    How can I solve this?
    Thank you in advance.
    Attachments:
    screen2.JPG ‏36 KB
    lab.JPG ‏17 KB
    screen1.JPG ‏53 KB

    You could do something like this.
    This creating a filename based on the hour and minute of the day then passing that as a parameter into the Write Measurement File function. Watch out its possible to get duplicate filenames with this method. Consider adding date elements to make the filename more unique.
    David
    Message Edited by David Crawford on 06-29-2006 03:48 PM
    Attachments:
    lvm file name.jpg ‏21 KB

  • Multiple deployed modules using log4j log to same file

    We have deployed two modules in ias 6.5 Solaris - moduleA and moduleB. Each of these modules uses log4j to write to a log file - logA and logB. Each module includes logj4.jar in it's WEB-INF/lib directory and the classes are unzipped upon deployment into an org/apache/log4j directory under each module.
    Upon app server startup, neither module is loaded. A request is sent to /NASApp/moduleA. logA is written to as the module is initialized. A request is then sent to /NASApp/moduleB. logB is written to as the module in initialized. A request is then sent to /NASApp/moduleA again. This request should be logged in logA but is instead written to logB.
    This happened in ias 6.0 sp3 as well as ias 6.5.
    An attempt to determine the source of the problem:
    The /APPS/modules/moduleB/WEB-INF/lib/org/apache/log4j directory was removed. This should cause ClassNotFoundExceptions to be thrown when attempts are made to write to log4j from moduleB. The appserver is first stopped, then killed, then started again - neither module is loaded. A request is sent to /NASApp/moduleA. logA is written to as the module is initialized. A request is then sent to /NASApp/moduleB - a request that should result in ClassNotFoundExceptions being thrown because the log4j classes are no longer present in the module's classpath. Instead, logB is written and everything behaves as was described above.
    Based on this test, we believe that the root of this problem is once again a class loader issue. Apparently, the log4j classes are being loaded by a class loader that is shared between both moduleA and moduleB. Normally this would not cause a problem, but in the case of log4j, the target log file is being overwritten and causes the log entries to be shared between the two modules.
    What must we do to remedy this problem? At present, the only fix we know will work is to run a separate appserver instance for each module - a solution that is not acceptable due to the amount of resources consumed by all of the deployed code.

    Hi,
    You are correct it is a classloader problem, in sp4/6.5 you have a separate classloader for each module (war/jar) but all the helping classes inside modules share a single classloader, that's why even after deleting the helping files from ModuleB it was working.
    The remedy to your problem is to create ear module out of those ModuleA and ModuleB and put the helping jar files in both of the ear modules. For ias an ear file is an J2EE application and a separate classloader instance is dedicated to it, it holds true for all the helping classes in the ear module too and the helping classes in two J2EE application (ear module) no longer share the classloader.
    I hope it will solve your problem. For further information regarding classloaders please visit Classloader runtime hierarchy.
    Please feel free to ask further questions.
    Sanjeev,
    Developer Support, Sun ONE Application Server-India.

  • How do I specify the location of log4j.log?

    I want to create the log4j.log file in "C:\TEMP\" for Windows and "/tmp/" for linux. Is there anyway that I can do to that?
    Here is what I currently have for my log4j.properties:
    # SET ROOT CATEGORY PRIORITY TO DEBUG AND ONLY APPENDER TO A1, C1, R
    log4j.rootCategory=DEBUG, C1, R
    log4j.appender.C1=org.apache.log4j.ConsoleAppender
    log4j.appender.C1.layout=org.apache.log4j.PatternLayout
    log4j.appender.C1.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    #Create the file in Windows
    #log4j.appender.R.File=C://TEMP//log4j.log
    #Create the file in Linux
    log4j.appender.R.File=/tmp/log4j.log
    log4j.appender.R.MaxFileSize=15000KB
    # KEEP FIVE BACKUP FILES
    log4j.appender.R.MaxBackupIndex=5
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
    #log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%nThank You,
    Chris

    Here is another configuration file that uses multiple appenders.
    log4j.rootLogger=debug, stdout, R
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=example.log
    log4j.appender.R.MaxFileSize=100KB
    # Keep one backup file
    log4j.appender.R.MaxBackupIndex=1
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%nIn addition, as the root logger has been allocated a second appender, output will also be directed to the example.log file. This file will be rolled over when it reaches 100KB. When roll-over occurs, the old version of example.log is automatically moved to example.log.1.

  • Log4j logging unnecessary Logs in a file

    Hi All,
    I have used Log4j logger to log details in java. I have used debug statements and directed the logs to a file in the server using Log4j.properties file. But, when i check the logs, along with the log statements that i have added in the code, i see lot of unnecessary logs like below. Please let me know how to avoid these logs and get only the logs from my code.
    +2010-08-19 23:13:43,825 DEBUG Log4jLogger.debug() -  receiverSubNoType : PREPAID receiverActivationCode : 30+
    +2010-08-19 23:13:46,535 DEBUG Log4jLogger.debug() - Blocked packages:+
    +2010-08-19 23:13:46,537 DEBUG Log4jLogger.debug() - Pkg 0:381+
    +2010-08-19 23:13:46,538 DEBUG Log4jLogger.debug() - Pkg 1:341+
    *2010-08-19 23:13:46,542 DEBUG ProjectResourceBundle.handleGetObject() - org.apache.axis.i18n.resource::handleGetObject(transport00)*
    *2010-08-19 23:13:46,544 DEBUG Call.setTransport() - Transport is org.apache.axis.transport.http.HTTPTransport@12eac27*
    *2010-08-19 23:13:46,544 DEBUG Call.invoke() - Enter: Call::invoke(ns, meth, args)*
    From the above logs in the file, the first four lines are from my code, but the rest of the lines, i am not sure and unable to avoid them.
    My Log4j.properties file is as below.
    log4j.rootLogger = ERROR,stdout,A2
    log4j.appender.stdout = org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
    *log4j.appender.stdout.layout.ConversionPattern = %d [%t] %-5p %c{1}.%M() %x - %m%n*
    log4j.appender.A2 = org.apache.log4j.DailyRollingFileAppender
    log4j.appender.A2.File = /export/home/oracle/zainsoa/j2ee/oc4j_soa/applications/ccore/ccore/log/zainportal.log
    log4j.appender.A2.DatePattern='.'yyyy-MM-dd
    log4j.appender.A2.layout = org.apache.log4j.PatternLayout
    log4j.appender.A2.layout.ConversionPattern = %d %-5p %c{1}.%M() - %m%n
    Please Help!
    MJ

    Dear Malcolmmc,
    Thanks for your inputs. I tried to set the logging level to error as u said. In the httpd.conf file, the loglevel is set to warn. Also, in the log4j.properties file, i have set rootlogger to ERROR as shown below from my log4j.properties.
    log4j.rootLogger = ERROR,stdout,A2*
    log4j.appender.stdout = org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
    *log4j.appender.stdout.layout.ConversionPattern = %d [%t] %-5p %c{1}.%M() %x - %m%n*
    log4j.appender.A2 = org.apache.log4j.DailyRollingFileAppender
    log4j.appender.A2.File = /export/home/oracle/zainsoa/j2ee/oc4j_soa/applications/ccore/ccore/log/zainportal.log
    log4j.appender.A2.DatePattern='.'yyyy-MM-dd
    log4j.appender.A2.layout = org.apache.log4j.PatternLayout
    log4j.appender.A2.layout.ConversionPattern = %d %-5p %c{1}.%M() - %m%n
    In my java code, i have used the statements like
    Log4jLogger.debug(" receiverContractNo : " + receiverContractNo );
    where Log4jLogger is a custom class to handle the logs. I have written following in this class.
    logger = Logger.getLogger(Log4jLogger.class);
    PropertyConfigurator.configure("log4j.properties");
    *public static void debug(String debugStr){*
    logger.debug(debugStr);
    Please suggest as to where the changes have to be done as i am unable to proceed and still this problem.
    Regards,
    MJ

  • Oracle Daignostic Logging Vs Log4j logging

    Which type of logging is advisable/best for Oracle SOA applications? Oracle Daignostic Logging (ODL) or Log4j logging ?
    Thanks
    Sree

    We have found it better to use ODL logging because of the support of tracking logs using the ECID. This allows logs across multiple components to be followed. Also the ODL logs can be searched and viewed through EM or the plain text log files and can be exported and viewed in JDeveloper offline as well.

  • Upload multiple files WITH correct pairs of form fields into Database

    In my form page, I would like to allow 3 files upload and 3 corresponding text fields, so that the filename and text description can be saved in database table in correct pair. Like this:
    INSERT INTO table1 (filename,desc) VALUES('photo1.jpg','happy day');
    INSERT INTO table1 (filename,desc) VALUES('photo2.jpg','fire camp');
    INSERT INTO table1 (filename,desc) VALUES('photo3.jpg','christmas night');
    However, using the commons fileupload, http://commons.apache.org/fileupload/, I don't know how to reconstruct my codes so that I can acheieve this result.
    if(item.isFormField()){
    }else{
    }I seems to be restricted from this structure.
    The jsp form page
    <input type="text" name="description1" value="" />
    <input type="file" name="sourcefile" value="" />
    <input type="text" name="description2" value="" />
    <input type="file" name="sourcefile" value="" />The Servlet file
    package Upload;
    import sql.*;
    import user.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Date;
    import java.util.List;
    import java.util.Iterator;
    import java.io.File;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    public class UploadFile extends HttpServlet {
    private String fs;
    private String category = null;
    private String realpath = null;
    public String imagepath = null;
    public PrintWriter out;
    private Map<String, String> formfield = new HashMap<String, String>();
      //Initialize global variables
      public void init(ServletConfig config, ServletContext context) throws ServletException {
        super.init(config);
      //Process the HTTP Post request
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        Thumbnail thumb = new Thumbnail();
        fs = System.getProperty("file.separator");
        this.SetImagePath();
         boolean isMultipart = ServletFileUpload.isMultipartContent(request);
         if(!isMultipart){
          out.print("not multiple part.");
         }else{
             FileItemFactory factory = new DiskFileItemFactory();
             ServletFileUpload upload = new ServletFileUpload(factory);
             List items = null;
             try{
                items = upload.parseRequest(request);
             } catch (FileUploadException e) {
                e.printStackTrace();
             Iterator itr = items.iterator();
             while (itr.hasNext()) {
               FileItem item = (FileItem) itr.next();
               if(item.isFormField()){
                  String formvalue = new String(item.getString().getBytes("ISO-8859-1"), "utf-8");
                  formfield.put(item.getFieldName(),formvalue);
                  out.println("Normal Form Field, ParaName:" + item.getFieldName() + ", ParaValue: " + formvalue + "<br/>");
               }else{
                 String itemName = item.getName();
                 String filename = GetTodayDate() + "-" + itemName;
                 try{
                   new File(this.imagepath + formfield.get("category")).mkdirs();
                   new File(this.imagepath + formfield.get("category")+fs+"thumbnails").mkdirs();
                   //Save the file to the destination path
                   File savedFile = new File(this.imagepath + formfield.get("category") + fs + filename);
                   item.write(savedFile);
                   thumb.Process(this.imagepath + formfield.get("category") +fs+ filename,this.imagepath + formfield.get("category") +fs+ "thumbnails" +fs+ filename, 25, 100);
                   DBConnection db = new DBConnection();
                   String sql = "SELECT id from category where name = '"+formfield.get("category")+"'";
                   db.SelectQuery(sql);
                    while(db.rs.next()){
                      int cat_id = db.rs.getInt("id");
                      sql = "INSERT INTO file (cat_id,filename,description) VALUES ("+cat_id+",'"+filename+"','"+formfield.get("description")+"')";
                      out.println(sql);
                      db.RunQuery(sql);
                 } catch (Exception e){
                    e.printStackTrace();
            HttpSession session = request.getSession();
            UserData k = (UserData)session.getAttribute("userdata");
            k.setMessage("File Upload successfully");
            response.sendRedirect("./Upload.jsp");
      //Get today date, it is a test, actually the current date can be retrieved from SQL
      public String GetTodayDate(){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        String today = format.format(new Date());
        return today;
      //Set the current RealPath which the file calls for this file
      public void SetRealPath(){
        this.realpath = getServletConfig().getServletContext().getRealPath("/");
      public void SetImagePath(){
        this.SetRealPath();
        this.imagepath = this.realpath + "images" +fs;
    }Can anyone give me some code suggestion? Thx.

    When one hits the submit button - I then get a 404 page error.What is the apaches(?) error log saying? Mostly you get very useful information when looking into the error log!
    In any case you may look at how you are Uploading Multiple Files with mod_plsql.

  • Multiple file copies just randomly miss a few of the files

    This is something that has happened to me on all networks I've used. My home network (gigabit LAN or 802.11n), work network, and any client network I've ever been on while supporting.
    I can select say 10 files on my MBP in finder. And either copy/paste or just drag to copy onto an SMB share (windows 2003 at home for my windows home server, also 2008 and 2008 R2 servers at work and clients). And the file copy goes fine. I see the progress window, it goes and I see the files populating the network share as it progresses. It runs the normal amount of time I'd expect for the speed of the network, and when it's done I get my sound. Then anywhere from three to nine of the files just disappear off the network share as the copy finishes. So it takes the time to copy them but does not complete.
    And it's not an every time thing. And it ONLY happens with multiple files, i NEVER have a problem doing files singularly. The same files that fail in a batch go fine when I copy them one by one in the same session after it failed doing them all at once.
    No errors on the windows side of things in the logs, disks are fine. Never happens with my MBP when I do it from windows either via VMware or booting directly into boot camp.
    No errors on the mac side, for all intents and purposes it completed successfully. Yet almost every time I do group copies, only a couple actually are on that network share when all is said and done.
    No AV or firewall on the server at the moment so it happens whether I have them enabled or uninstalled. No AV on the MBP.
    And no disconnects, etc. I'm watching things in an RDP session while the copy is happening and I never lose the network, it never drops. Downloads that I sometimes have going on are working just fine, everything is just perfect in every respect as far as networking goes, except for those copying of multiple files.
    Saw someone else had disabled write caching on the windows machine to overcome an actual error they had, and i had tried that in this instance long ago to no avail.
    This has happened since I first bought the laptop in July of '09 and it was running leopard, and has continued through every single version update since. Wired or wireless...
    Thanks for any suggestions.

    hey JDThree, i'm having the SAME EXACT PROBLEM!!! i've tried restarting both my server and my MBP, and it does the job a bit, but it's so random. even doing a single file copy doesn't seem to work. i tried copying over one file, then when it finished and was on the server, i copied the next file, and it removed the first file. so strange. anybody have any ideas?

  • Hi I am looking for a way to have trace32 open multiple files on remote computers

    Simply put I am looking for someone who could afford to give me a basic script (vbs) that I could run from an elevated command prompt. It would need to be available for me to type in the name of a remote computer or (mulitple if possible) and also
    allow me to choose log files to open or multiple files and then open them using trace 32. Hopefully it would detect the available log files and show me what is available to choose to open... anyone know of such a thing or know how to go about setting up something
    like this for people to use?
    EDIT
    I was able to create a basic script to do what I wanted but I want to be able to add wildcards for the rollover logs... Can someone suggest the easiest way to do that as I am not sure how to add the wildcards directly before the .log
    here is the script.
    ' ******Created by Luis Delgado*********
    'This script will get a remote computers .log files depending on which documents you enter in the "files to open on remote computer using trace32" section
    'Get and open log files on remote Computer
    on error resume next
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    strcomputer   = inputbox("Enter remote computer name or leave as localhost for this computer","Get log files from a remote computer with Trace32","Localhost")
    If strComputer = "" Then
      WScript.Quit
    End If
    'Opens trace32
    wshShell.run "C:\Program Files\ConfigMgr 2007 Toolkit\CCM Tools\Trace32.exe"
    'Files to open on remote computer using trace32
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices.log"
    !!!!NOTE!!!
    What I need is for any file that starts with datatransferservices, ccmexec, or locationservices to open in trace32
    my thought would be place a wild card in its respective spots but it does not work see below
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\datatransferservice*.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\ccmexec*.log"
    wshShell.Run "\\" & strcomputer & "\c$\Windows\System32\CCM\Logs\locationservices*.log"

    The roll over logs all have the same name exact the extension is .lo_ , So.. I'm not sure what you are looking for.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Loading multiple files with SQL Loader

    Hello.
    I will appreciate your recommendation about the way to load multiple files (to multiple tables) using SQL Loader with only one Control file.
    file1 to load to Table1, file2 to load to Table2 etc.
    How the Control file should look like?
    I was looking on Web, but didn't find exactly what I need.
    Thanks!

    Ctl File : myctl.ctl
    ---------- Start ---------
    LOAD DATA
    INFILE 'F:\sqlldr\abc1.dat'
    INFILE 'F:\sqlldr\abc2.dat'
    INTO TABLE hdfc1
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    INTO TABLE hdfc2
    (TRANS_DATE CHAR,
    NARRATION CHAR,
    VALUE_DATE CHAR,
    DEBIT_AMOUNT INTEGER,
    CREDIT_AMOUNT INTEGER,
    CHQ_REF_NUMBER CHAR,
    CLOSING_BALANCE CHAR)
    -----------End-----------
    Sqlldr Command
    sqlldr scott/tiger@dbtalk control=F:\sqlldr\myctl.ctl log=F:\sqlldr\ddl_file1.txt
    Regards,
    Abu

  • Error in loading the multiple file loading

    hi,
    i am following this blog to load the multiple files into rdbms table.
    http://www.odigurus.com/2011/05/multiple-files-single-target-table.html
    the problem is that when i assign the source Flat file Datastore
    Model Resource Name #Project_Name.FILE_NAME
    But when i point the Single File in the  Resource Name:EMP.DMP. its working fine. loaded suceessfully.... But problem in Multiple loading???
    it gives me error
    SQL*Loader-500: Unable to open file (E:/File/#Project_Name.FILE_NAME)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    ********************Task Error Code In Loading**********************************************
    import java.lang.String
    import java.lang.Runtime as Runtime
    from jarray import array
    import java.io.File
    import os
    import re
    ctlfile = r"""E:/File/Med_CDR_File.ctl"""
    logfile = r"""E:/File/Med_CDR_File.log"""
    outfile = r"""E:/File/Med_CDR_File.out"""
    oracle_sid=''
    if len('')>0: oracle_sid = '@'+''
    loadcmd = r"""sqlldr 'test/<@=snpRef.getInfo("DEST_PASS") @>%s' control='%s' log='%s' > "%s" """ % (oracle_sid,ctlfile, logfile, outfile)
    rc = os.system(loadcmd)
    if rc <> 0 and rc <> 2:
         raise "Load Error", "See %s for details" % logfile
    # Init Vars
    nbIns = 0
    nbRej = 0
    nbNull = 0
    strprt = ""
    maxAllowedError = r"""0"""
    c = 0
    flag = 0
    # Open log file
    f = open(logfile, "r")
    try:
         lines = f.readlines()
         for line in lines:
              if line.rstrip().upper().endswith(r"""TEST.TC$_0MSC_SMS:""".upper()):
                   flag = 1
                   c = 0
              if flag == 1:
                   if c > 0 and c <= 4:
                        if c == 1 :
                             nbIns = int(re.findall("\d+", line)[0])
                        elif c == 2:
                             nbRej = int(re.findall("\d+", line)[0])
                        elif c == 4:
                             nbNull = int(re.findall("\d+", line)[0])
                             break
              c+=1
         strprt = "\n\tIns:\t%s\n\tReject:\t%s\n\tNullField:\t%s" % (nbIns, nbRej, nbNull)
    finally:
         f.close()
    # if some rows has been rejected due to invalide data, check KM option LOA_ERRORS
    if rc == 2:
         if nbRej > int(maxAllowedError):
              raise strprt
              break
    waiting
    Regards,
    Edited by: AMSI on Nov 10, 2012 1:40 AM

    Hi AMSI,
    Did you try to run only the interface? It might not work.
    Try executing your interface from within a package. A previous step should refresh / set the variable.
    Regards,
    Jerome Fr

  • File corruption on SDCard when multiple files are being written from WinCE 6.0R3

    We currently have file corruption problems which we have been able to reproduce on our system which uses WinCE 6.0R3. We have an SDCard in our system which is mounted as the root FS.  When multiple files are being written to the file system we occasionally
    see file corruption with data destined from one file, ending up in another file, or in another location in the same file.  We have already written test SW that we have been able to use to reproduce the problem, and have worked with the SDCard vendor to
    check that the memory controller on the card is not the source of the problems.
    We know that the data we send to WriteFile() is correct, and that the data which eventually gets sent through the SDCard driver to the SD card is already corrupted.
    We believe that the problem is somewhere in the microsoft private sources between the high level filesystem API calls and the low level device calls that get the data onto the HW.
    We have confirmed that the cards that get corrupted are all good and this is not a case ofpoor quality flash memory in the cards. The same cards that fail under WinCE 6.0R3 never fail under the same types of testing on Windows, Mac OX, or linux.  We
    can hammer the cards with single files writes over and over, but as soon as multiple threads are writing multiple files it is only a matter of time before a corruption occurs.
    One of the big problems is that we are using the sqlcompact DB for storing some data and this DB uses a cache which get's flushed on it's own schedule. Often the DB gets corrupted because other files are being written when the DB decides to flush.
    So we can reproduce the error (with enough time), and we know that data into the windows CE stack of code is good, but it comes out to the SDcard driver corrupted.  We have tried to minimize writes to the file system, but so far we have not found a
    way to make sure only one file can be written at once. Is there a setting or an API call that we can make to force the OS into only allowing one file write at a time, or a way of seeing how the multiple files are managed in the private sources?
    Thanks
    Peter

    All QFE's have been applied we are building the image so we have some control.
    I have build an image which used the debug DLL's of the FATFS and I have enabled all of the DebugZones.  The problem is still happening. From the timings in the debug logs and the timestamps in the data which corrupts the test file I have been able
    to see that the file is corrupted AFTER the write is complete. Or at least that's how it seems.
    We finished writing the file and closed the handle. Then more data is written to other files. When we get around to verifying the file it now contains data from the files that were subsequently written.
    What I think I need to do is figure out in detail how the two files were "laid down" onto the SDCard.  If the system used the same cluster to write the 2 files then that would explain the issue.

  • Adobe Acrobat pro 9.4.6 crashes when opening multiple files simultaneously.

    We have Adobe Acrobat Pro 9 which has been updated to version 9.4.6. we had this problem when the 9.4.5 update was applied also. It is now crashing when we try to open multiple files simultaneously.
    Yesterday, I narrowed down the problem to 6 plugins:
    IA32
    ADBC
    eBook
    EScript
    HLS
    PPKLite
    SaveAsRTS
    However, we discovered that that Comments and markup tool bars weren't loading. So I did a repair install on it.
    Now those plugins from yesterday work and Acroform.api is causing it to crash when opening multiple files.
    I did try other suggestion that involved using Icacls/cacls on dll files to no avail.
    It is running on XP SP3 fully updated with plenty of RAM and HDD space.
    Is there a way to fix this without reinstalling?

    I am not sure what's causing this problem on your machine because everything's working fine for me.
    What is the version of Acroform.api on your machine now.
    Do a Repair after deleting this file and see if it works.
    Enable Windows MSI logging (http://support.microsoft.com/kb/314852) before you do a repair, upload that log to some file sharing server, and paste its link here.

  • Adobe Bridge CC : metadata copy from one field to another for multiple files

    So I am using Bridge CC for managing audio files and have many many MP3's that I need to copy or move one field of metadata to another.
    ie:  copy "Audio Artist" field to "IPTC Core Creator" Field
         move "IPTC Core Description" to "Video Log Comment" field
    Is there a script I can add that will let me select multiple files, and have it copy or move all the info from one of these fields to another?
    Thanks
    Scott
    [email protected]

    Scott, I did have a go at this but I can't get the right path to the logComment in the XMP…
    Coping artist to creator works fine… If I find the solution I will post back…

  • Adobe Acrobat 9.5 crashes when OCR multiple files.

    Adobe Acrobat 9.5 crashes when OCR multiple files. A window appears Adobe Acrobat has stopped working." Then Windows closes the program.
    Log Name:      Application
    Source:        Application Error
    Date:          7/15/2013 9:08:55 AM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      ENV12W7.dot.state.nv.us
    Description:
    Faulting application name: Acrobat.exe, version: 9.5.5.316, time stamp: 0x518ac052
    Faulting module name: drs832.dll, version: 8.0.2.1088, time stamp: 0x47f2127d
    Exception code: 0xc0000005
    Fault offset: 0x0013c31f
    Faulting process id: 0x109c
    Faulting application start time: 0x01ce8174d93e1008
    Faulting application path: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe
    Faulting module path: C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\plug_ins\PaperCapture\drs832.dll
    Report Id: d8a8f897-ed68-11e2-bae0-d4ae52c31ca5

    Please do check the Performance of your computer at that point of time .
    As some time the usage also causes the issue that makes a software stopped working .
    In order to chek the system performance , check the Task Manager and go to Performance tab .
    If still the issue persists , try wih the following link :
    http://helpx.adobe.com/acrobat/kb/acrobat-could-access-recognition-service.html

Maybe you are looking for

  • Can't login Lync suddenly, the error is" There was a problem acquiring a personal certificate required to sign in."

    Dear all, This is a real issue in working. Our company provides office 365 mailbox and its lync for users. Recently, many users meet such issue of " There was a problem acquiring a personal certificate required to sign in." The lync version is 2010 a

  • FLV File Import Error - Unrecognised Compression !

    Hi, I am getting an error message "Unrecognised Compression" when trying to import an FLV file into Premiere Pro CS5.5. Should I just download a free convertor and convert to mp4 or wmv or are there any other options to import it into CS5.5? If anyon

  • Sending mail messages

    We send out a newsletter 3x per week to 20,000+ members of the association. CFMAIL tag is used to insert personal info for the member in the newsletter and messages are correctly written to spool folder. We have noticed timeouts occurring in other ap

  • Advanced search in iPhoto

    How can you search for photos with an "and" function instead of an "or" function (i.e. only find photos with all names as opposed to all photos with either name)?

  • Partner function upload-lsmw

    Dear Experts, how to upload partner functions by using LSMW. I developed LSMW and if i go to partner function tab there is only one partner function field is available I need to upload 4 partner functions. Can any one help me out in this regard. rega