I. Introduction of LOG4JThe log4j has three main components: loggers (Logger), appenders (output source), and layouts (layout). This can be simply understood as the log category, where the logs are to be exported and how the logs are exported. The combined use of these three components makes it easy to record the type and level of information, and to control the style and location of the log output at run time.1, loggersThe loggers component is divided into five levels in this system: DEBUG, INF
I. Introduction of LOG4JThe log4j has three main components: loggers (Logger), appenders (output source), and layouts (layout). This can be simply understood as the log category, where the logs are to be exported and how the logs are exported. The combined use of these three components makes it easy to record the type and level of information, and to control the style and location of the log output at run time.1, loggersThe loggers component is divided into five levels in this system: DEBUG, INF
Reprint: http://blog.sina.com.cn/s/blog_56fd58ab0100tcna.html, log4j IntroductionThe log4j has three main components: loggers (Logger), appenders (output source), and layouts (layout). This can be simply understood as the log category, where the logs are to be exported and how the logs are exported. The combined use of these three components makes it easy to record the type and level of information, and to control the style and location of the log output at run time.1, loggersThe loggers compone
I. Introduction of LOG4JThe log4j has three main components: loggers (Logger), appenders (output source), and layouts (layout). This can be simply understood as the log category, where the logs are to be exported and how the logs are exported. The combined use of these three components makes it easy to record the type and level of information, and to control the style and location of the log output at run time.1, loggersThe loggers component is divided into five levels in this system: DEBUG, INF
multi-client concurrency and authentication, providing better support for open API clients such as JDBC and ODBC.so this article will take HiveServer2 as an example, introduce and write the remote operation of Hive Java API. The key configuration information for Hive is listed first and used in this article:After making sure that the above configuration is correct, start the HiveServer2 service below:Start the metabase first, and at the command line type: Hive--service Metastore (the symbol i
Detailed parsing of _ Log4j _ configuration, parsing _ log4j Configuration
1. Introduction to Log4j
Log4j has three main components: Loggers, Appenders, and Layouts ). This can be simply understood as the log category, where the log is to be output, and in what form the log is output. Using these three components together, you can easily record the types and levels of information and control the log output style and position at runtime.
1. Loggers
Loggers components in this system are divided in
. Using the create method of this object, you can generate instances of finite state machines.
Copy codeThe Code is as follows:Var fsm = StateMachine. create ();
A parameter object must be provided to describe the nature of an instance. For example, traffic signals (traffic lights) can be described as follows:
Copy codeThe Code is as follows:Var fsm = StateMachine. create ({Initial: 'green ',Events :[{Name: 'warn', from: 'green', to: 'yellow '},{Name:
object StateMachine, which uses the Create method of the object to generate an instance of a finite state machine.
var fsm = StateMachine.create();
When generating, you need to provide a parameter object that describes the nature of the instance. For example, a traffic light (stoplight) can be described like this:
var FSM= StateMachine.Create({Initial:' Green ', events:[{Name:' Warn ', from:' Green ', to:' Yellow '},{Name:'
to record the type and level of information and to control the style and location of the log output at run time. The following three components are described separately:
2.4.1 Log Recorder Logger
The Logger object is used to replace the System.out or System.err log writer for the programmer to output log information.
Configure root logger, syntax:
Log4j.rootlogger = [level], Appendername, Appendername,...
Where level is the priority of logging, divided into off, FATAL, ERROR,
package into the Lib directory
2: Put the log4j.properties file in the SRC directory
3: Import the class into the class import Org.apache.log4j.Logger;
4: Define objects in the class logger logger = Logger.getlogger (This.getclass ());
5: Use logger output log logger.info (string);
The Apache Common Log Pack (log4j, download address: http://logging.apache.org/log4j) is an open source code project for Apache, which provides a common set of log interfaces, The two commonly used interfaces in a c
=errorLog4j.logger.net.sf.navigator=errorLog4j.logger.org.apache.commons=errorLog4j.logger.org.apache.struts=warnLog4j.logger.org.displaytag=errorLog4j.logger.org.springframework=debugLog4j.logger.com.ibatis.db=warnLog4j.logger.org.apache.velocity=fatal21stLog4j.logger.com.canoo.webtest=warn23Log4j.logger.org.hibernate.ps.preparedstatementcache=warnLog4j.logger.org.hibernate=debugNum Log4j.logger.org.logicalcobwebs=warnThe third step: the corresponding modification of the attributes, before the
under/etc/security/limits.d/90-nproc.conf file Settings
Change the maximum number of threads for Linux, add or modify as follows:* Soft Nproc Unlimited
vim/etc/security/limits.d/90-nproc.conf
* soft Nproc unlimited
root soft Nproc Unlimited
1.11 Three machines are modified configure Linux/etc/sysctl.conf file SettingsChange Linux one to have the most memory area requirements, add or modify the following:
Vm.max_map_count = 262144 Change Linux disable swapping, add
model, that is, data persistence mechanism, to the data table curd operation, please look forward to ...
Ps:Node.js and sails~ logging mechanism
See sails's log will think of Log4net, it is true that they are similar in many places, are the way to use the grading record, and sails I feel more convenient to use, it does not require us to do more things, direct sails.log. Level ("Your log Content") is done, You do not need to care about what the single case, or the persistence of the way, sails
JMeter Run problems You can adjust the JMeter log-level positioning problem, but it is recommended that you turn off the JMeter log when you run the test, jmeter the print log consumes system performance.
The JMeter log is stored by default in the%jmeter_home%\bin directory, and the filename is usually JMeter.log. Log logging information about the JMeter itself running.
JMETER uses the log4j log component to output logs, and the Log_level.jmeter in%jmeter_home%\bin\jmeter.properties is used to c
Logger.getlogger () method. If the argument is the class, log4j will go to the name of the logger, such as org.linkinpark.commons.logtest.Log4jTest.
The loggers component is divided into five levels in this system:Trace→debug→info→warning→error→fatal→off. It is important to keep in mind that the level of the grade is high and the level of automatic shielding is low.
Here log4j has a rule: assuming the loggers level is P, if a level Q in loggers is higher than p, it can be activated or shield
running.
Once added, the effect is as follows:
2014-05-25 20:11:47,738 INFO [org.apache.hadoop.conf.Configuration.deprecation]-session.id is deprecated. Instead, use Dfs.metrics.session-id 2014-05-25 20:11:47,741 INFO [Org.apache.hadoop.metrics.jvm.JvmMetrics]- Initializing JVM Metrics with Processname=jobtracker, sessionid= 2014-05-25 20:11:49,079 WARN [ Org.apache.hadoop.mapreduce.JobSubmitter]-No job jar file set. User classes May is not found.
(_.contains ("Spark")). Count
If you feel that the output log is too many, you can create Conf/log4j.properties from the template file:
$ mv Conf/log4j.properties.template conf/log4j.properties
Then modify the log output level to warn:
Log4j.rootcategory=warn, console
If you set the log4j log level to info, you can see such a line of log info sparkui:started Sparkui at http://10.9.4.165:4040, which
Tags: clear license arc data log put Ali moved Ack1. Problems When installing node using the Brew Install node command:macbook-pro:~ zh$ Brew Install node==> Downloading https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3_2.leopard_64.bottle.tar.gzAlready downloaded:/users/zh/library/caches/homebrew/portable-ruby-2.3.3_2.leopard_64.bottle.tar.gzError: Checksum mismatch.expected:f1db8863543d256e6a8e704bf618025030b3d22a7a6b19749d19f599b5554212actual:d3843f61522afd7a5340aa055847e
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.