Logging app messages into another file than server.log

Hello:
I'm working with Application Server Enterprise Edition 7 2004Q2 and I'd like logging application messages into another file than server.log.
I tried to set up a logging configuration file as
com.appname.handlers = java.util.logging.FileHandler
( where all packages in my application are named like com.appname.* )
and pass it as
-Djava.util.logging.config.file
But nothing happens. Indeed , no file is created.
I tried with
handlers = java.util.logging.FileHandler
and works fine but, obviusly, are wrote server messages too.
So, the problem is 'com.appname.handlers ' property, but I dont know why.
any workaround to perform this ?
what's wrong ?
Thanks in advance.
Best regards

Hi,
The samples are usaully in the samples directory of the appserver install dir. However, this might depend on the server install.
Anyway, samples can be downloaded from:
http://developers.sun.com/prodtech/appserver/reference/codesamples/index.html
This is a zip file with all the samples stuff
The actual code in there:
        // import for logging classes
        import java.util.logging.*;
        //Remove all handlers
        Handler[] h = logger.getHandlers();
        for (int i = 0; i < h.length; i++) {
            logger.removeHandler(h);
//Set it to its parent handler so that it gets NOT (by Robert) printed on the server log
// In the original sample this is set to true
logger.setUseParentHandlers(false);
The actual way of adding your own file log handler:
     // Create a file handler with a string as parameter for filename
      Handler fh = new FileHandler(<LOGFILENAME>);
       // Create a formatter to format the logger
       fh.setFormatter(new SimpleFormatter());
       // Add the handler to logger instance 
       logger.addHandler(fh);See the javadocs for formatting stuff,
HTH Robert

Similar Messages

  • Since updating to OS X Yosemite, I am unable to save files into another computer or server. I have to save it on my desktop and then drag it into the server. How do i correct this?

    Since updating to OS X Yosemite, I am unable to save files into another computer or server. I have to save it on my desktop and then drag it into the server. How do i correct this?

    Ok this worked to solve the error.
    Use cmd prompt in windows 7 or 8 and run as admin:
    sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
    sc config mrxsmb20 start= disabled
    No need for all that power shell nonsense as shown elsewhere for windows 8.
    That's it. Also force smb2 disabling on the apple side for good measure.
    With the above I was able to network mavericks and windows 8.1 pro flawlessly. He issues I had before where I could not read video, ISO and audio files (but could open documents and pictures from the windows machine connected to an apple network share folder went away.

  • Clone my exacting oracle apps 11i into another box

    Hi,
    I want to clone my exacting oracle apps 11i into another box.
    Bellow, I am describing current setup:
    OS: Solaris 9
    Application Version: 11.5.7
    Database version: 8.1.7
    Single Node Installation on Sun Cluster (Active / Passive Mode)
    Node 1 Host name: orafin1 (10.1.1.33)
    Node 2 Host Name: orafin2 (10.1.1.34)
    Virtual Host Name: orafin (10.1.1.35)
    Now we want to clone exiting apps on another sun box on bellow setup:
    OS: Solaris 10 (64 Bit)
    Stand Alone cloning with out Sun Cluster.
    Please suggest me , solution about above scenarios.
    Thanks
    Anup

    Dear All,
    One of my previous apps dba suggested me how to do manuall cloning, I have 11.5.10.2 but it is upgraded from 11.5.9, though it is autoconfig enabled but rapid clone has errors and I dont want to touch the Source Production system, my steps will be like this , please correct me if I am wrong.
    1. Copy dbTier - rdbms home to target system
    if (hot backup use rman backup)
    2. copy appsTier to Target system
    On Target System.
    3. set ORACLE_SID, ORACLE_HOME
    run rman target /
    restore controlfile
    mount the database and restore database and recover.
    alter database open resetlogs
    alter tablespace temp add datafile
    shutdown immediate;
    startup.
    4. connect apps/apps
    exec fnd_conc_clone.setup_clean;
    commit;
    exit;
    5. change dbTier context file
    change the host name to Target hostname
    run autoconfig :
    cd /u2/oracle/proddb/9.2.0/appsutil/bin
    adconfig.sh contextfile=conext_file appspass=apps
    6. run autoconfig on appsTier
    cd /u2/oracle/prodappl/ad/11.5.0/bin
    adconfig.sh contextfile=context_file appspass=apps
    Mohammed Vilayath Ali

  • Can we able to take the out put have the file into another file in unix

    Hi all ,
    My question is .. we are having one shall fill , we need to take the output of that file to another file ,
    but the output is not printing into another file..
    what am guessing is we have only read and execute permission on that file.. we don't have write permission on that file and the folder where the file is exists .
    my Question is , Do we need all permission on File to copy the output to another file... ?
    because we are redirecting the output to another folder where we can create the another file and read and write permissions .
    -rwxrwxr-x 1 th th 499 Jun 20 01:06 Coverage
    like this we are having the permission on that file
    for the folder we are having the permission
    drwxrwxr-x 6 kpsmith kpsmith 12288 Aug 9 21:59 1.3
    can any one help me out from this problem
    Thanks
    Sreedhar

    Assuming 'shall fil' is shell script , other than dumping even more garbage in this forum, what does this question have to do with Oracle?
    Or can't you type anything in the address bar of your browser and is this URL the only one you can visit?
    Sybrand Bakker
    Senior Oracle DBA

  • How to create a file and store its contents into another file?

    Hi,
    I'm having some trouble trying to create a code where I have to to create a file and store its contents into another file?
    I read the API, but I'm not certain how this file thing works.
    Here's my code so far:
    public static void main(String[] args) throws Exception
              File file = new File("tasks.txt");
              if (file.exists())
                   System.out.println("File already exists");
                   System.exit(0);
              Scanner scan = new Scanner(System.in);
              Scanner scan2 = new Scanner(System.in);
              //Scans the input line by line
              scan.useDelimiter("\\n");
              //Scans the input by tabs
              scan2.useDelimiter("\\t");
              PrintWriter outputs = new PrintWriter("newtasks.txt");
              outputs.print("ok");
              outputs.println(3);
              outputs.close();
         }

    I managed to change my text into uppercase, but how do I store the uppercase content into another file.
    -So this is what I did so far, I took a text file and modified its strings to uppercase.
    -Now I need to put those modified strings into another text file, is there a way where I can do that with my current code?
    -I already tried printwriter, but it doesn't seem to work
    public static void main(String[] args)throws IOException
              //Task[] oneHundredTasks = new Task[100];
              String uppercase;
              String combine;
              Scanner scan = null;
              FileInputStream in = null;
            FileOutputStream out = null;
            PrintWriter output = null;
            try
                 scan = new Scanner(new BufferedReader(new FileReader("tasks.txt")));
                 scan.useDelimiter("\\n");
                 scan.useDelimiter("\\t");
                while (scan.hasNext())
                     if(!scan.hasNext())
                          scan.next();
                     combine = scan.next();
                     uppercase = combine.toUpperCase();
                     System.out.println(uppercase);
            finally
                if (scan != null)
                    scan.close();
            //The program will try the input and output files
            try
                 in = new FileInputStream("tasks.txt");
                out = new FileOutputStream("newtasks.txt");
                int c;
                //The number "-1" is used to indicate that it has reached the end of the stream.
                while ((c = in.read()) != -1)
                    out.write(c);
            finally
                if (in != null)
                    in.close();
                if (out != null)
                    out.close();
         }

  • How to read from one file and write into another file?

    Hi,
    I am trying to read a File and write into another file.This is the code that i am using.But what happens is last line is only getting written..How to resolve this.the code is as follows,
    public String get() {
         FileReader fr;
         try {
              fr = new FileReader(f);
              String str;
              BufferedReader br = new BufferedReader(fr);
              try {
                   while((str= br.readLine())!=null){
                   generate=str;     
              } catch (IOException e1) {
                   e1.printStackTrace();
              } }catch (FileNotFoundException e) {
                   e.printStackTrace();
         return generate;
    where generate is a string declared globally.
    how to go about it?
    Thanks for your reply in advance

    If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
    import java.nio.*;
    import java.nio.channels.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    class Kopy {
         * @param args [0] = source filename
         *        args [1] = destination filename
        public static void main(String[] args) throws Exception {
            if (args.length != 2) {
                System.err.println ("Syntax: java -cp . Kopy source destination");
                System.exit(1);
            File in = new File(args[0]);
            long fileLength = in.length();
            long t = System.currentTimeMillis();
            FileInputStream fis = new FileInputStream (in);
            FileOutputStream fos = new FileOutputStream (args[1]);
            FileChannel fci = fis.getChannel();
            FileChannel fco = fos.getChannel();
            fco.transferFrom(fci, 0, fileLength);
            fis.close();
            fos.close();
            t = System.currentTimeMillis() - t;
            NumberFormat nf = new DecimalFormat("#,##0.00");
            System.out.print (nf.format(fileLength/1024.0) + "kB copied");
            if (t > 0) {
                System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
    }

  • How to save the contents of one file into another file?

    Hai,
    i'm trying to save the contents of an existing file into a new file...
    for example.. if i'm having a ms word file namely ss.doc..
    now i want to save itz contents into another file namele dd.doc..
    How shall i do it..
    Can an one plzz explain me...
    senthil.

    Hi, Senthil.
    This Forum is not a general discussion forum.
    You don't believe that the InDesign SDK is a general purpose API. Do you?
    I think you must post issues like this where they belong, in this case in a Microsoft Word Forum.
    Best regards.
    Oscar.

  • Disabling logging of HEAD request in HTTP web server logs

    Hi,
    I would like to stop the logging of HEAD requests in my HTTP server logs. I was thinking of using the Rewrite rule, however, there may be a more direct way of doing this. Is there a configuration setting within HTTP Server to do this?
    I'm using WebTier component of Weblogic 10.3.2.
    Thanks,

    I found the solution to disable HEAD requests.
    Edited by: WallyP on Mar 11, 2010 12:24 PM

  • I have a number of pages with html extension in different files. Is it possible to merge them into one file? Is it possible to convert them into another file type such as PDF, MOBI, or EPUB? Thanks

    While downloading an eBook from internet, I found a book in a folder containing around 123 files, which is equivalent to the number of pages of the book.
    My interest is to bring them together in one file so that I can read it at a time. As the interface is not comfortable with html, I also like to convert it into another more suitable file format.

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • Log4j - logging different levels into different files??

    hi, i wonder if it is possiple to log different logging levels to different files. for example: i want all info,debug and warning messages to be logged into file a.log and all error messages into b.log. has anybody an existing property files which shows how to do that?? thanx a lot.

    i googled like hell but couldn't find a good
    example...err.Really?
    http://jakarta.apache.org/log4j/docs/manual.html

  • Splitting one message into two files

    Hi all,
         I have a case where I have to generate two files for a single incoming message.The scenario is as follows-
    I have the following structure as target -
    - Structure 1 with some fields in it
    - Structure 2 with some fields in it
    I have done the mapping of the target with the source.
    Now what I require is a separate file for structure 1 and another file for structure 2
    Thanks,
    Sandeep

    You need to use BPM for this.
    First create a message mapping with one source and two targets.
    To add more message types to a mess map, go to the Messages tab (there are 3 tabs: Design, Test, Messages ).
    Then you need one transformation and two send steps in the BPM.
    regards
    SKM

  • Any way to log debug messages to a file?

    Is there any way to reroute all the messages SQLDev throws into a "logging page" tab to a text file? I want to provide as much info for devs as possible along with issues I report, and for that enabling debug config and analyzing the messages is one of the keys. However, investigating these in the tab is a pain - sometimes it's hard to see the full text, sometimes the important bits are washed away by the unimportant background info, etc. There is also no way to analyze those when SQLDev hangs. Plaintext log would solve all of that, AND it'll be easier to attach for investigation. Any way to configure this?

    Right click where, exactly?
    Also, even if that's possible, that'll save only 3000 lines a time (that's way below debug output from a long session) and doesn't cover hangs.

  • Question about changing a file type into another file type

    Hello. This isnt a java question but you guys have been so helpful in the past I hope its ok if I ask this question for a friend.
    How can I import a scriptware file into Screenwriter 2000, or change a .scw file into a .tag file?
    Anyone who can help thanks.

    I know nothing about scriptware or Screenwriter. But, my only advice is to see if Scriptware can export some other file type (not necessarily a .scw file) that Screenwriter can read. Sometimes, when I have two text editors whose native formats are incompatible (like opening a paper typed in a new version of Microsoft Word using an old version of WordPerfect or something), I save the file as an RTF file, rather than in the native format. Maybe something like that applies to your situation, too.
    Hope that helps.
    Jason

  • How to save to data into another file in the Report Generation Toolkit

    I read a doc template and wirte many data and bmp into it. I want to create a new doc file with my own name,
    But in my test, data will be writen into my template. If user don't notice it, my template will be overriden. Can
    I save to a new file in my program? please help me about it.
    Thanks.
    br

    HI, NIhuyu
    thank your answer.
    I will try it.
    Can you tell me the meaning of star out and end out of vi?
    I am not clear about it.
    Thank your very much.
    br

  • Moving a message to another file: not all files are listed by "MOVE": how do I get a local file shown on the left of the screen onto the move command list?

    I have some 20 "local" files, but when I want to copy or move a mailing only about half of these are listed as possible destinations. Why are some of then hidden and how can I get the full list to appear in the Move (or the Copy) window?

    I can't reproduce that here. I get a whole folder tree to explore.
    However, I prefer to use QuickFolderMove.
    It turns the '''right-click|Move To''' pop-out into a MRU list along with a text entry box so you seek a folder by entering all or part of its name. The beauty of this is that it doesn't care which folder or account the target folder is in. The downside is that you need to have a pretty clear idea of the name of the folder you're looking for.
    https://addons.mozilla.org/en-US/thunderbird/addon/quick-folder-move/?src=api

Maybe you are looking for

  • Issues with xorg on HP 1030NR

    Hello all,    has anyone gotten arch to work on an hp 1030nr netbook? im having issues with the xorg and tried everthing i could find in the wiki and as well as other distro's forums to find solutions.. ive been using arch for over a year now and ive

  • Ical syncing issues with iphone/imac after lion OS update.

    Hi All, I upgraded to lion and now have two issues with syncing my iphone and ipad to my imac. First issue is that calander entries created on the iphone/ipad do not appear in the imac calander after syncing. Second issue is that if I change an calan

  • Software Raid 5 - Performance

    Hi all, we have a problem with a software RAID 5. Its read performance is acceptable (61 MB/s via UFS filesystem) while its write performance is very very bad. 3 MB/s through UFS filesystem is not acceptable for a machine with 6 1.35 GHz CPUs and 7 v

  • Is it possible to synch ICal in OS10.8 and Google Calendar so friends can view and change it on a PC?

    Is it possible to synch ICal in OS10.8 and Google Calendar so friends can view and change it on a PC?  The friends have no IOS devices, ITunes, or ICloud accounts.  Thanks, if you have performed this miracle!

  • Tracking where I am in between TTL pulses

    Greetings.  I have a little Labview experience but very little with counters.  I have a PCI-6602 card with a CB-68LP connector block.  I have used up 7 of the 8 channels counting events so I have one channel left.  What I have is a Z pulse that is fo