How to log just plain text but not xml while using util.logging?

i tried the following code to log simple messages in my app.However it logs the messages in xml. I don't want this and only plain text will be enough so what should i do? e.g. using some formatters?
import java.util.logging.*;
class LoggerTest{
     public static Logger logger =Logger.getLogger("demo.test");
     public static  void main(String args[]) throws Exception{
          FileHandler fh = new FileHandler("log.xml",true);
          logger.addHandler(fh);
          for(int i=0;i<100;i++){
               logger.log(java.util.logging.Level.INFO,"appanded");
}thx!

This post
http://forum.java.sun.com/thread.jsp?thread=319861&forum=31
shows that if you make a properties file (you can name it logging.properties or whatever) with at least the line
java.util.logging.FileHandler.formatter= java.util.logging.SimpleFormatter
and then run with
java -Djava.util.logging.config.file=logging.properties LoggerTest
you will get what you want.
You can set this property programmatically (actually the SBIS is deprecated, but I am too lazy to do the StringReader class right here):
String my_prop = "java.util.logging.FileHandler.formatter=java.util.logg
ing.SimpleFormatter" ;
Properties props = new Properties (System.getProperties());
props.load( new StringBufferInputStream( my_prop));
System.setProperties(props);
but you would need to set the property before you create the formatter.

Similar Messages

  • HT2736 How do i just send a song, not a hole album from my itunes on my iphone. You can do it from my computer but not my iphone.

    How do i just send a song, not a hole album from my itunes on my iphone. You can do it from my computer but not my iphone. Please help. if there is not solution then someone should fix this!

    It's not currently possible to gift a single song from an iOS device, you can only gift albums.
    If you want to leave feedback for Apple (these are user-to-user forums) then you can do so via this page : http://www.apple.com/feedback/iphone.html

  • HT1430 hey, I just reset my Apple ID and suddenly much of my Iphone text history disappeared.  and I can send texts, but not receive any.  what do I do?  is this related to AppleID, or is the text issue from something else?  thx!

    hey, I just reset my Apple ID and suddenly much of my Iphone text history disappeared.  and I can send texts, but not receive any.  what do I do?  is this related to AppleID, or is the text issue from something else?  thx!

    Hi blyther,
    Thanks for using Apple Support Communities.  If you're unable to receive texts, see this article for troubleshooting steps:
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Cheers,
    - Ari

  • How do i delete files in pages, i have some old invoices in pages that i want to delete, i can delete the text but not the whole file, please help. Dennis

    As it say's above i need to delete some of my oldinvoices/estimates from my files in pages, i can get rid of the text but not the whole file, thanks Dennis

    You locate the file in the Finder(it's in the Documents item of the sidebar by default), drag it to the Trash, and empty the Trash.
    (59926)

  • How do you add plain text?

    Hi all!
    I have a very simple question, which is just what it says in the subject line of this topic.
    How do I add plain text into iMovie? No fades, no slides, no nothing, just plain text?
    From what I've been searching online, no one has answered this question, but then again, no one has asked it either.
    All I could find was 1 yahoo thread with the question in which the answer was not clear at all.
    I've been trying to find it myself by snooping around in iMovie, but as you might guess, unsuccessfully.
    From snooping around I've come to draw the conclusion that you probably can't add plain text into iMovie via iMovie directly.
    However, and idea I had was, if I create an image in, lets say Paint 2, with whatever plain text I want to add, and then insert it into the project. Will this have the same effect?
    Can anyone please confirm this? I'm going crazy just looking for such a simple feature hehehe.
    Thank you in advance!
    //cez

    hmm, well ... a video isn't meant for reading (resolution, compression, blabla). ...
    so 'text' in a video should be very large in font, avoid tiny details, too much contrasts ... blabla again
    Advice using the Title-feature as 'text' isn't wrong.
    plus, iMovie is no text-processor, you copy/paste larger amounts of letters into it.
    If you need/want 'a page full of text' in iMovie, indeed you have to do the roundtrip by creating a 'picture' of your text-page, and insert that jpg to your Project.
    The good news:
    if your 'picture (=text page) is longer than the video screen, you can apply a nice Ken Burns effect to 'scroll' through the text ... in case, your audience reads as fast as you.
    bad news: max is 5:1 ratio of the 'page' ... so, no 'books' please ...
    Aside Star Wars ("... in a galaxy far, far away from here"), you should avoid 'text' longer than a usual title.
    (this answer/workaround isn't in the 'canned' replies of our hosts, you should forgive'em ... )

  • How to send a plain text and HTML email at once?

    Hi all,
    I'm attempting to use cfmailpart to send a HTML and plain text email all in the same cfmail script.  I'm using Outlook and Gmail to test.  I temporarily changed my Outlook settings to "read all standard mail in plain text," but it does not read the plain text cfmailpart of the email, it just attempts to format the text from the HTML email and display the links.  If I remove the HTML cfmailpart from my cfmail script, the plain text version is delivered, but Outlook removes extra line breaks that I actually want to keep intact, and some of the other formatting is improperly rendered.  Is there a better way to make sure email clients hold the plain text formatting (even though there really isn't any formatting with plain text) and a better way to test?  The HTML version looks great in both Gmail and Outlook.
    Thanks!

    Use the wraptext attribute of the cfmailpart tag to add line breaks.

  • How can I paste plain text on mac air?

    I am trying to paste text from anywhere but always it comes with its original font and style. How can I paste just plain text?

    - Use TextEdit
    - Go into TextEdit preferences and change it from Rich Text to Plain Text

  • How to Delete document from Item but not Item itself

    Hello
    I'm working on Oracle Portal (10g)
    I'm thinking about one problem:
    - how to physically remove document form the Oralce repository using PL/SQL
    Does removing row from WWDOC_DOCUMENT$ remove file from hard disk (some
    trigers on Delete?).
    BTW:
    There is one strange (for me ;) ) behavior: I create an item with atached
    file (file item) what happent:
    - in table WWDOC_DOCUMENT$ is new row for new file created.
    - in table WWV_THINGS$ is new row for new item created
    Now I would like to remove file but not item (still using PL/SQL).
    I use function for example:
    PORTAL.Wwdoc_Api.remove_document('101801.BMP');
    This function remove path id and filename but not whole file row itself (but
    this is less problem). And othere more important problem: after
    PORTAL.Wwdoc_Api.remove_document called there is still in item rows pointer
    to just deleted file in fields: FILENAME and VALUE.
    I would like to set this fileds to null. - in othere way there is exception
    durring page deletion (no document found).
    I use:
    update portal.wwv_things p1
    set
    p1.FILENAME = null,
    p1.VALUE = null
    where p1.ITEMTYPE like 'basetext'
    and p1.LANGUAGE = wwctx_api.get_nls_language
    and p1.SITEID = pagegroupID
    and p1.CORNERID = pageID
    and p1.filename like '101801.BMP' ;
    But this seems to not work at all.
    Any body else had some problems like me?
    How it was solved.
    BTW: I work with item versioning.
    BIG THANKS YOU FOR ANY HELP

    You can try my new DeDupe script. It should be able to get rid of the redundant copies while keeping one copy of each track in each format. See this thread for background.
    I've not used the feature, but iTunes can downsample to 128k AAC on the fly as it syncs your devices. Of course you might find the process is too slow for your needs or find that 128k is too much compression.
    tt2

  • ITunes opens but without any text showing.  Drop down menus have text but not the app itself. I have a Mac Powerbook Pro running Windows XP under Boot Camp.

    Running under Windows XP,  a few upgrades ago iTunes started opening without any text showing in the application.  Clicking on PLAY will play music but no text shows to indicate what's playing and no text to show music library. Drop down windows show text but not the app itself.
    Subsequent upgrades and reinstalls have not corrected the problem, When I run under iOS (Snow Leopard), iTunes opens with text and runs correctly.
    Help!

    Because I created FAT32 partition using Boot Camp tool few days ago I installed my custom copy of Windows XP with SP3, IE7 and WMP10 integrated using nLite (for WMP10 integration use RVM Integrator). I did not use Boot Camp tool this time - I just booted CD using Option key. Then I installed Boot Camp 2.0 drivers you can find on Mac Disk 1. After this I installed Boot Camp drivers 2.1 update. In Add or remove Programs I checked drivers - I uninstalled old drivers which call identical, but you can skip this. Everything works fine BTW it is better to format your partition to NTFS - you have much less disk errors, you do not waste time for disk errors scans during Windows startup, your data are much more safe. If you need NTFS write permissions use great tool Paragon NTFS for Mac OSX or open source NTFS driver.
    Message was edited by: limo79

  • Aperture adds the same name to all new locations, how do I delete the name but not the address?

    Aperture adds the same name to all new locations, how do I delete the name but not the address?

    It's easy to rename each unit.  When you connect your iPad and it syncs, the unit will appear on the left of the iTUnes screens just click on the unit there and you can rename it.  You should do this immediately so you can see which unit was backed up by it's name. You can sync as many decices as you want in one iTunes library and you can even share Apps as long as you're going to sync both from teh same iTunes account.  My household has 2 iPad 2s and we share our apps, and we also share downloaded books, magazines, music, etc.......

  • How can I tell with % how fast I am uplaoding a file...I know how to find it for DOWNLOADING, but not uploading.

    I just switched to Firefox...I used to have Google Chrome...when I would upload a file, a % number would scroll at the bottom showing me how much has been uploaded....how do I find that on Firefox....I know how to find the DOWNLOAD box, but not one for UPLOADING opr sending files

    I mistyped in my first post. I do indeed mark the video as AF41 (Cos4). It is the call control that I mark CS3 with the policy map to get around the old Tandberg bug that doesn't mark the call control.
    So do you think the queue 3, where Cos4 goes to, is big enough to handle 30 video streams of 480k? If my calculation is correct that would be 14.4mbps of video on a 100mbps port.
    With this config.....
    srr-queue bandwidth share 10 10 60 20
    srr-queue bandwidth shape 10 0 0 0
    ...is it telling me that queues 1 & 2 get 10% bw, queue 3 gets 60% and queue 4 gets 20% bw and is shared? If that is correct than 60% is more than enough for 14.4mbps of video.
    What happens if too much video overruns the queue?

  • Move graphics with text--but not inline--in PM...??

    Hello, is there a way in PageMaker to move graphics with text but not inline? I ask because right now I see two options for graphics:
    --inline, so you cannot place the graphic exactly where you want AND the text only flows way above or below--but not next to--the graphic
    or
    --independent so you can place the graphic exactly where you want and the text DOES flow right next to the graphic, but then the graphic doesn't move with the text
    I'd like to be able to place graphics exactly where I want AND have them move with the text, like the "Move object with text" option in Word.
    thank you!
    L

    well it has been a while since i used PageMaker so i didn't realize it was "dead."
    though i'm not surprised and am kind of glad. i was hired into a new job recently
    to work on a department newsletter, and i'm trying to find a good authoring program
    within our budget. right now the newsletter is in Word but we've had a lot of problems
    with Word so i'm seeking an alternate solution. i'd like Frame but again there isn't
    enough money in the budget. i need a good option that is $500 or less...i'm trying Publisher
    now too but not enough functionality...

  • I am at capacity How can I free up space but not delete music

    My Ipad is at 55.4 gb used 24 gb in music alone. 2.7 gb available so can't do anything  Ipad shuts itself down and won't let me open mail, use facebook, safari.How can I free up space but not delete songs in library   

    Unless you are attempting to download a sizable file, 2.7 GB should be more than enough to continue fucntioning. Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps from the tray BEFORE doing the reset.

  • I have just put a link to my web site but it does not appear while using Firefox but it does if using Internet explorer or Chrome why would this be?

    I am using Window 7 I have just put a link to my web site but it does not appear while using Firefox but it does if using Internet explorer or Chrome why would this be?
    It does appear on a friend's computer using Firefox.
    Barossa Vintage Festival ... this is the missing link on my computer just under the link named ... Autumn photo collection

    No problems here with the tree links:
    View photos
    Friends gather for breakfast
    Friends take an Autumn drive
    Photos of the Barossa Festival
    Reload the web page and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • HT5787 i have logged in my account but not able to verify email

    i have logged in my account but not able to verify email

    Do you mean that (a) you do not receive the the verifcation email, (b) the verifcation email does not have a working link in it, (c) the webpage at the address of the link in the verification email is not responding, (d) after typing in your Apple ID and password to verify your email address, the webpage does not respond, or (e) the Apple ID and password combination you are using to verify your email address does not match what Apple has on records.
    (1) If (a), check your junk folder for the email. If it is not there, see 2..
    (2) If (b, c, or d), then you might simply try later. The webpage could be have a temporary issue.
    (3) If (e) use the expresslane to resolve password issue: https://expresslane.apple.com/GetCountriesDetails.do
    All the best!

Maybe you are looking for