Dizzy death mistake, changed half a day also did not think is such reason, Foundation is going to ah ...Let's take a look at the warning message:07-07 08:32:19.540:warn/windowmanager (in): Failed looking up window07-07 08:32:19.540:warn/windowmanager: java.lang.IllegalArgumentException:Requested window [email protected] does not exist07-07 08:32:19.540:warn/windo
In the software, it is inevitable to use something like log4net, log4j, tracer to write logs. No matter what you use, these things are mostly similar and generally provide such five log levels:
Debug
Info
Warn
Error
Fatal
A level is higher than a level, but in specific development, there is no good article to explain how to select a level for adaptation. Record some of your opinions for future use.
=== Debug ===
The lowest level is generally
/impl/staticloggerbinder. class] slf4j: see http://www.slf4j.org/codes.html#multiple_bindings for an explanation. slf4j: actual binding is of Type [Org. slf4j. impl. log4jloggerfactory] 14/08/14 18:20:15 warn spark. sparkconf: spark_classpath was detected (set to '/home/hadoop/src/hadoop/lib/:/APP/hadoop/sparklib /*: /APP/hadoop/spark-1.0.1/lib_managed/jars /*'). this is deprecated in Spark 1.0 +. plea Se instead use :-. /spark-submit with -- driver-c
**************************************** ********************/
During formatting, if the ing between the host name and IP is not added to the/etc/hosts file: "172.25.40.171 VM-40-171-sles10-64", the following error is reported:14/04/17 03:44:09 WARN net. DNS: Unable to determine local hostname-falling back to "localhost"Java.net. UnknownHostException: VM-40-171-sles10-64: VM-40-171-sles10-64: unknown errorAt java.net. InetAddress. getLocalHost (InetAd
On the Friday to a customer to do database inspection, is the window 2008 system on the 10g of a set of NC system library, has been configured DG, but the inspection found that the database error:Tue Nov 10:13:57 2014lns:standby redo logfile selected for thread 1 sequence 3945 for destination Log_archive_dest_2tu E Nov 10:14:29 2014Errors in file d:\oracle\product\10.2.0\admin\nc\bdump\nc_arc0_177356.trc:Ora-16401:archivelog rejected by RFSFal[server, ARC0]: FAL archive failed, see trace file. S
Tag: Eve process body resolved to open the return character. comFirst, the use of logging moduleModule for easy logging and thread-safeCRITICAL = 50FATAL = CRITICALERROR = 40WARNING = 30WARN = WARNINGINFO = 20DEBUG = 10NOTSET = 0Simple to use#!/usr/local/bin/python#-*-coding:utf-8-*-import logginglogging.debug (' Debug Message ') Logging.info (' info message ') ) Logging.warn (' Warn message ') logging.error (' Error message ') logging.critical (' Cri
favorites
1. require ('firephpcore/fb. php'); // import the package
2.
3./* NOTE: You must have Output Buffering enabled
4. ob_start () or output_buffering ini directive .*/
5 ./*
6. enable the output buffer (because Firephp mainly uses the header function), there are three methods:
7. * add ob_start () to the front of the program ()
8. * modify php. ini to set output_buffering to 1 or on
9. * modify apache settings and add php_flag output_buffering on to the configuration file.
10 .*/
11.
12.
Simple to use#!/usr/local/bin/python# -*- coding:utf-8 -*-import logginglogging.debug(‘debug message‘)logging.info(‘info message‘)logging.warn(‘warn message‘)logging.error(‘error message‘)logging.critical(‘critical message‘) Output:
WARNING:root:warn messageERROR:root:error messageCRITICAL:root:critical message
By default, the logging module prints the log to the screen (stdout) with a log level of warning (that is, only log information
1. Simple to use#!/usr/local/bin/python# -*- coding:utf-8 -*-import logginglogging.debug(‘debug message‘)logging.info(‘info message‘)logging.warn(‘warn message‘)logging.error(‘error message‘)logging.critical(‘critical message‘) Output:
WARNING:root:warn messageERROR:root:error messageCRITICAL:root:critical message
By default, the logging module prints the log to the screen (stdout) with a log level of warning (that is, only log informati
operation.
Interval => $seconds, # Once the above conditions are in effect, how often each cell callback.
CB => $CB, # CB is the abbreviation of callback, so know it, as long as the conditions in front, will run the CB => point function.
);
Use instance:
The following example is, 5 seconds later, every 2 seconds in the callback event, until $w the registered event is undef (that is, $count > 10). The undef $w in this case is the way to cancel this watcher.
Copy Code code
all printed by default to Rootlogger
Appenders: target for user-defined final log output: console, file, remote server
Most commonly used: Org.apache.log4j.consoleappender/org.apache.log4j.rollingfileappender
Layouts: Define log Output format: Timestamp, thread name, log level, log content, corresponding class to output the log, method to output the log, line number, and MDC information
Most commonly used: Org.apache.log4j.PatternLayout
The relationship between the three:
Each logger can
first, a simple introduction to the use of log4j steps
The whole is divided into the following steps: 1, the introduction of Log4j-*.*jar, the JAR package 2, add a configuration file (Log4j.xml or Log4j.properties), 3, the Packaging Log tool class in the business use. This is the traditional use of the steps, but we can directly with the Lombok wrapped Log tool class, the specific steps:
1.1 Introducing Jar packs
1.2 Add configuration file
Configuration files We can use Log4j.xml or log4j
, WARN, INFO, DEBUG, all, or levels you define. LOG4J recommends using only four levels, from high to low, respectively, for error, WARN, INFO, and DEBUG. By the level defined here, you can control the switch to log information at the appropriate level in your application. For example, if the info level is defined here, all debug-level log information in the application will not be printed.Appendername is w
Log4j Introduction1 consists of three major components:Logger: determines what log information should be output and what log information should be ignored.Eg. logrj. Logger. helloapplogger = warnThe code above defines a logger component named helloapplogger and assigns it a log level warn (a total of five log levels: fatal, error, warn, info, debug)Its log level is warn
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.