Log4j - issue in configuring the file name for daily rolling file adapter

We have configured the log4j properties. We want to create back-up of log file each hour. The file name of the log file is MyApp.log and as per the below configuration after each hour backup file is created as
MyApp.log<<time>>
but we want that file should be created in follogin format
MyApp<<time>>.log
Below are the log4j properties configured, please let us know, what should be the correct option to create the filename in desired format.
# Set root logger level to DEBUG and its only appender to MyApp.
log4j.rootLogger=DEBUG, MyApp
log4j.appender.MyApp=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MyApp.File=D:/logs/MyApp.log
log4j.appender.MyApp.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.MyApp.Append=true
log4j.appender.MyApp.layout=org.apache.log4j.PatternLayout
log4j.appender.MyApp.layout.ConversionPattern=[%d{yyyy-MM-dd} %d{HH:mm:ss z}] %m%n

yes you can use /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW
In the SAP system, there is no uniform rule for the structure of the actual text key Textname. However, in order to be able to maintain the structures and fields, you have to know what the structure of text name as well as the values for text object and text ID are.
Procedure
       1.      Display a text of the required text type.
       2.      Branch to the editor.
       3.      Choose Goto > Header.
The Text header dialog box appears.
Result
In the Text header dialog box, you gather the required information.

Similar Messages

  • C Programming: How can we get the filesystem name for a given file-path?

    C Programming: How can we get the filesystem name for a given file-path?
    Say I have a filepath=/mnt1/file1
    Using some OS API like stat, can I get the Filesystem /mnt ?
    Thanks in advance,
    -V

    Enter the command up to the point of entering the file path and add a space, then drag the file into the terminal window. It will fill out the path.
    If you need to go further into the contents of the Application package, you can continue with /Contents...
    Another way is to start typing and then hit Tab to auto-complete. It will stop where it can't determine the next letter.
    So, type /App tab and it will fill in /Applications. Type a / and start with the name of the app, then tab and it should complete. Continue till you have the correct path.
    Spaces will be replaced with \<space>, so, App Store would end up as /Applications/App\ Store.app

  • Export Indd to EPS/JPG and set the file name  for EPS/JPG file

    Hi,
       When I export the INDD to JPG/EPS, I want to set the file name with pageNumber  for JPG/EPS files using javascript.
    For Example
    If I set the file name as EPSFile.eps, after exporting the indd(with 2 pages) to eps
    ,files are generating in the following name EPSFile_1.eps, EPSFile_2.eps.
    but I want to set the file name as EPSFile_001.eps and EPSFile_002.eps using javascript.
    anyone knows please reply for this.
    Regards,
    Mubeen

    Hi,
      I tried the following code.
    var JPGe = new File("Applications/PDF/JPG/file.jp");
    app.activeDocument.exportFile(ExportFormat.jpg, );
    when I use this code ,exported jpg file names are
    file.jpg, file1.jpg,file3.jpg.
    but ,I want the output file names as file_001,file_002,file_003,
    Thanks,
    Mubeen

  • Dynamic File name for Open Hub file

    Hi All,
    I wanted to create a .csv file using open hub destination. I wanted the name of the file to be dynamic based on month. for example in jan I wanted it as 01.Dump for January and 02.Dump for february.
    is is possible at all to do that.I wanted to save the file in the application server. There should not be any manual intervention the process.
    Thanks in advance.
    Regds
    Raghu

    Hi
    We have take month from the first record that we read.
    Our requirement is to take one months data and give it in a file with a file name having the corresponding month.
    In the code mentioned below MOC_CODE is the field that is used for this purpose.
    Hope it helps.
    Regards,
    Raghu
    code:
    #!/bin/sh
    Script to dump file.
    Parameters.
    $1 Division name to extract from the data file.
    It re-arranges the columns.
    It replaces values in strings.
    Parameters.
    DATA_FILE_NAME="data_file.csv"
    HEADER_FILE_NAME="header_file.csv"
    DIVISION_NAME="$1"
    Re-arrange header file columns.
    Transpose rows to columns comma separated.
    HEADER_ROW=`cat "$
    Re-arrange header columns.
    Re-direct the output to a temporary file.
    " | tr '\n' ',' | sed 's/,$//g'`
    echo "$" | awk 'BEGIN { FS = ","; OFS = "," } { print $2, $3, $1, $4, $5, $6, $7 }' > "$.$.tmp"
    Prepare awk program.
    Re-arrange data file columns.
    Replace UNI in 6th column with UNIT and Replace TON in 6th column with TONS.
    Filter division rows.
    AWK_PROGRAM="BEGIN { FS = \",\"; OFS = \",\"; TVAL = 0 } \$5 ~ /$/ { sub( \"UNI\", \"UNIT\", \$6 ); sub( \"TON\", \"TONS\", \$6 ); print \$2, \$3, \$1, \$4, \$5, \$6, \$7; TVAL = TVAL + \$7 } END { printf \"$ Total Value: %f\", TVAL 2> \"$$Re-direct the program to a temporary program file.Control.ctl\" }"
    echo "$" > "$.awk"
    Execute the data file formatting command.
    awk -f "$.awk" "$" > "$.$
    Get generation date.
    Get moc code from data file.
    .tmp"
    GENERATION_TIME=`date +"%Y%m%d_%H%M%S"`
    MOC_CODE=`head -1 $ | awk -F, '{ print $3 }'`
    Prepare dump file.
    DUMP_FILE_NAME="$_$_$_$"
    cat "$.$.tmp" "$.$.tmp" > "$
    Remove temporary files.
    FTP dump file to remote server.
    FTP.
    rm *.tmp
    REMOTE_SERVER="<replace with server ip address>"
    REMOTE_USER="xxxx"
    REMOTE_PWD="xxxx"
    ftp -n "$" << EOF
         quote USER "$"
         quote PASS "$"
         ascii
         put "$"
         bye
    EOF
    Exit.
    exit 0

  • Setting file name for a downloaded file

    I've set up a file download using code I've gleaned from jsf forums. However, the file name is not being set correctly. When the user downloads File.doc, it shows up as downloadPage.jsf. Am I setting the header correctly?
    public class VendorInfoBean extends AbstractViewController {
        public VendorInfoBean() {
        public String downloadVendorApp() {
            ExternalContext context = getExternalContext();
            String path = context.getInitParameter("externalFiles");
            String filename = "Vendor_Application_e_Form.doc";
            String fullFileName = path + filename;
            File file = new File(fullFileName);
            HttpServletResponse response = (HttpServletResponse) context.getResponse();
            response.setHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");
            response.setContentLength((int) file.length());
            response.setContentType("application/msword");
            try {
                FileInputStream in = new FileInputStream(file);
                OutputStream out = response.getOutputStream();
                // Copy the contents of the file to the output stream
                byte[] buf = new byte[1024];
                int count;
                while ((count = in.read(buf)) >= 0) {
                    out.write(buf, 0, count);
                in.close();
                //out.write(bytes);
                out.flush();
                out.close();
                FacesContext.getCurrentInstance().responseComplete();
            } catch (IOException ex) {
                ex.printStackTrace();
            return null;
    }

    StringBuffer sbFilename = new StringBuffer();
         sbFilename.append("adeem");
         sbFilename.append(".doc");
    StringBuffer sbContentDispValue = new StringBuffer();
         sbContentDispValue.append("attachment");
         sbContentDispValue.append("; filename=");
         sbContentDispValue.append(sbFilename);
    HttpServletResponse response = (HttpServletResponse) context.getResponse();
    response.setHeader("Content-Disposition", sbContentDispValue.toString());
    i think this will work .. if not let me know i will give some code that will work for u then ...

  • File Name for Proxy to File

    Hi experts,
    My Scenario proxy to file(FTP). Currently in my Sender Data Type Proxy one of the field holds the file name to be created at the FTP.
    Could anyone help me how to use that field data (name) to create the file(FTP) with that name?
    Thank you experts.
    regards,
    s.saravannan

    Hi,
    You can get the same by creating a simple UDF (one argument - fname) and use the following code:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String filename = fname;
    conf.put(key, filename); 
    return  "true";
    Additional parameter, in Receiver communication channel is, provide file name as * and "Set Receiver File Name as Payload Attribute Value".
    Regards,
    Sachin Dhingra

  • Displaying file name for open Acrobat files

    Is there a way to copy and paste the URL for an open pdf file in Acrobat? We currently open the file in MS Word and copy the file link from the web toolbar display.
    Thanks for the help!
    Ken

    Thanks for the quick response. Is that a hard thing to do? We haven't done much with Java Script.
    Ken

  • How do I change the .php file name for a page of my site?

    how do I change the .php file name for a page of my site? The only link to the page is the nav. button link for it in the global nav. The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.

    The reason I need to change the file name is we want the breadcrumbing name to change and the breadcrumbing is linked to the file name.
    I don't understand this reason. How would changing the file extension solve your breadcrumb issue? Why don't you explain the issue in more detail.

  • Why does the file Name for file attached with Annotations "Attach File" (paperclip) become Unknown when Comments are Published?

    Our company recently purchased Adobe Acrobat Pro XI for the purpose of using it for shared electronic reviews.  We are using Send for Shared Review created in Adobe Acrobat Pro XI, and all the Comment tools work as expectedexcept the paperclip in Annotations.
    When a Word or Excel or Image(png,jpeg) file is attached using the Annotations paperclip, the initiator can initially see and open it. But after Publish Comments is selected and the review file is closed, the file "Name" changes to "Unknown" (although the Description has the correct file name and extension).  The Modified information is Unknown, as is the Size and Compressed Size.
    When the review file is then re-opened, even the initiator cannot open the file, although:
    The file location is marked with the paperclip within the document.
    The file name is shown in the Comments List with the initiator's name.
    In the Attachments list (the paperclip beneath the Thumbnails and Bookmarks) the Name appears as Unknown, Description shows the file name, Modified is Unknown, Size is Unknown, and Compressed Size is Unknown.
    The file Name cannot be edited, although the file Description can be.
    We have followed the procedure described in the tutorials but cannot figure out how to troubleshoot this situation.  Since this feature was the reason for the purchase of Adobe Acrobat Pro IX, we would any help. Please don't leave out any basics since we are all new users.
    We have several people with Adobe Acrobat Pro XI and the rest have Adobe Reader XI and it is a Windows platform.  Can someone please give us some advice how to get this feature to work as described?

    FYI Rave,
    There are some other forum entries with this exact same issue...:
    Cannot Open Attachments in PDF
    Why does the file Name for file attached with Annotations "Attach File" (paperclip) become Unknown when Comments are Published?
    Can someone help us get the COMMENTS ATTACHMENT TOOL to work as described in Acrobat Pro XI?

  • I just found an error in the file name for my Camera Raw Cache file.  How do I correct it?

    I just found an error in the file name for my camera raw cache file.  The error is in my username.  I don't know how to correct the error or if I should just leave it.  I'm not sure where my cache file is stored on my computer.  Any help would be appreciated.
    Thank you

    Since you are on a Mac if when you first set up your account you left out the i in Wilson nothing you do will change that. The REAL account name will always be alicewlson. Once an account is created you can't actually change the name of it. You can change the name that is displayed but not the REAL account name.
    Simplest thing to do is stop worrying about it. Everything is as it should be, that is except Wilson being spelled without the i.
    Lilac50 wrote:
    When I searched finder for "alicewlson" I found a long list of files like this:
    2014-07-22 12.50/File005.nef[15:16:35.212] (debug) src/ImageLoader.cpp:363: File: /Users/alicewlson/Recovered/2014-07-22 12.50/File002.nef[15:18:02.173] (debug) src/StoreXMLFile.cpp:21: /Users/alicewlson//.rpro/rpro.cfg
    I believe I made the error in my user name when I first got my computer a year ago. I then corrected it under my user name but not in my Lightroom files. I also looked for files with a .lrdata extension and didn't find any.

  • How to specify file names for the generated code in wscompile

    Hi,
    We want to follow a certain file naming conventions for the artifacts generated by wscompile.
    How is it possible to set the name for the service interface file, service implementation file etc....
    This is possible in AXIS ant task Wsdl2Java. How do we do it for wscompile.
    thanx

    Thanks Chris and c. Under Description I'm presented with three Names for the profile: ASCII, UniCode and Mac Script. ASCII and Mac Script are the same name for the profile, with nothing being in the UniCode Name box. Which do I change -- both?
    Am I going to screw things up in Photoshop if I change these names to something I can comprehend? Looks like I may just have to make a sticky-note list of the cryptic profile names with my own descriptive name as a reference. Thanks.

  • How to get the owner name for the file in ftp using abap ?

    Hi folks ,
    How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
    but doest work out me . Helping in this regard highly appreciated ...
    Thanks and regards,
    Swarupa Vanarchi

    Hi
    dont you  have used the os user while calling the FTP_CONNECT FM?
    Hope you are not talking about the user executing the FTP program.
    Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
    May be i am going too far with if and elses here as your question possesses no  clarity.
    Plz elaborate your requirement  before anybody can help.
    Regards
    sateesh

  • Assign Logical file name for the physical file path through Program

    Hi all,
    I am having a physical file which is getting generated dynamically. It is having the date and time stamp in its name which is added at runtime.
    Now I need to assign a logical file name for the physical file path through the program.
    Is there any FM or any other method to assign the same.
    Gaurav

    I think it is not possible. becuase the date & time added at runtime. so if you check the table  PATH you can find filename and their definitions

  • How do i change the HTML file names for existing index

    Hi,
    How do i change my existing HTML file names for indexes. The Html file name is disabled when we click on properties.
    Ex:   Index Keywork : Architecture
            Old HTML Page/URL =: Architecture.htm
    I want to change  Old HTML Page/URL =: Architecture.htm to architecture_new.htm
    Please find the screenshot attached.

    That's because you are looking at the Properties and that is not how you create index entries.
    Highlight the Index keyword ("Paste" in this example). It shows below what is already linked. If you delete that, the keyword will be displayed in bold to show no keyword is attached. You can add further keywords by dragging them from the Topic List.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • What is the table name for getting Last Receipt  & issue date of material?

    Hi Friends,
    What is the table name for getting Last Receipt  & issue date of material?
    *Case 1:*
    Here, I am running report in May 2008. But, if there is no goods receipt for the respective material since last 13th March 2007.
    Then in this case Last goods receipt date should be 13th March 2007.
    Please guide me.
    Regards
    Siva

    I checked MSEG table. But, I didn't find any field for date.
    Can you tell me field name.
    Regards
    Siva

Maybe you are looking for