Writing Log Records To Standard Error

 
 
To make a logger print log records on standard error,you need to add a ConsoleHandler to the logger
 
 
  1. // Create a console handler

  2.     ConsoleHandler handler = new ConsoleHandler();

  3.    

  4.     // Add to logger

  5.     Logger logger = Logger.getLogger("com.mycompany");

  6.     logger.addHandler(handler);
 
Copy to Clipboard      Download code as Text Format
 
  Date entered : 19th Mar 2007
  Rating : No Rating
  Accessed  :  9364
  Submitted by :  javabill
 
   Add Comment  Printer friendly
   View All Comments  Email to a friend
   Add to my Favourites Download PDF version
   Rating  
 
                 Click each image to add
this page to each site.
 
 
 
Comments Available

    No comment available at the moment.Be the first one to make a comment

 
Related JSP Source Codes
  • Spring
  • Wraps a string to a given number of characters using a string break character
  • Uppercase the first character of each word in a string
  • Make a string's first character uppercase
  • Strip whitespace (or other characters) from the beginning and end of a string

  • Copyright © 2013 VisualBuilder. All rights reserved

    Warning: Unknown(): write failed: Disk quota exceeded (122) in Unknown on line 0

    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0