Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Forward Log Records to Its Parent

                         

This section describes how to forward log records to its parent. You know that a logger sends both log records (messages declared before setting the log for it's parent and log messages after setting for it's parent) to handlers, parent or ancestor. See detailed information about this by the following paragraph.

Description of program:

Program creates a logger. Logger is set for the parent handling by setUseParentHandler(boolean value) method which is derived ahead. By default the parent handlers property is true and this provides facility to forward log records to its parent. But it resumes function when the property is false. Log records like: warning, info and severe etc that represents messages like: "Do something here!", "Here is available" and "Do severe here!".

Description of code:

log.setUseParentHandlers(boolean useparenthandlers):
This method takes boolean valued either true or false and sets into logger object. If you give true then logger sends messages to it's parent logger and log records written in its parent logger otherwise it doesn't display any message means does not forward to it's parent. 

Here is the code of program:

import java.util.logging.*;

public class ForwardLogRecords{
  public static void main(String[] args) {
    Logger log = Logger.getLogger("Preventing a Logger from Forwarding Log Records 
to Its Parent"
);
    log.warning("Do something here!");
    log.info("Here is available");
    log.severe("Do severe here!");
    log.setUseParentHandlers(false);
    log.warning("Don't something here!");
    log.info("Here is no any information!");
    log.severe("Don't severe here!");
  }
}

Download this example.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
Lookup Dispatch Action
customise css in jsp
Photoshop Effects Grun
jsp type 4 connection
ะ ย ะà¸???ะÂ
Eclipse 3.4 EJB
jsp applet netbeans
insert calendar image
mysql query
cache control
set tooltip row jtable
Photoshop Effects Hole
how will we set enviro
get column count colu
saving a file in a fol
xml
datatree
SCJP 6
EJB example program
400 book
java program examples
diplay North American
how to call css file f
How to Use JFrame in J
multiplying all even n
GWT DateTimeFormat exa
DOJO
unchained exceptions
spaces in string
data flow diagram
source code of puzzle
matches()
abstrct path name of f
Tree Grid
how to read key value
setvisible tab
login jsp
span
netbeans jsp
Array in Action Form
Call on extensible RMI
error-Unknown entity:
timeline using javascr
Player Class in the Ja
sub classes
facelet
.getCurrencyInstance
examples
Combattons la programm
How to get data from d
is the jvm same for al
convert linked list to
count
Struts Configuration f
onetomany example in h
Bean class tag
phases of java program
Image with mouse drag
b tree implementatio
get record using chara
ColdFusion Development
Combattons la programm
DFD
validating form using
Linux Caixa MаÐ??аÐ?
JSTL tutorials
Create JTree using XM
AND Operator
jdbc connections
CSS CSS Customize the
net use
how to include jsf tag
IEEE Projects
dwr reverse ajax
server dojo
Java Development Hiber
ะà???ะ ยà¸?ะà
PHP Randomizing Random
Hibernate Min() Functi
Photoshop Drawing 3D m
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.