threads, especially for multi-client multithreaded applications like Java Servlets. Percent: Output a "%" character%f: The file name where the output log message was generated%l: Line numbers in the output code%m: Output The message specified in the code, the resulting log specific information%n: output a carriage return newline character, the Windows platform is "\ r \ n", the UNIX platform for "\ n" Output log information line can be%1)%20c: Specif
Parameters
Description
Example
% C
Lists the full name of a logger namespace. If {
Example of parameters in the log4j configuration file
Output Display Media
Assume that the current logger namespace is "A. B. C"
% C
A. B. C
% C {2}
B .C
% 20c
(If the namespace length is less than 20, fill the space on the left)
%-
generates the log event. 7) % L: location where the log event is output, equivalent to % C. % m (% F: % L) combination, including the category name, the thread that occurs, and the number of lines in the code. Example: testlog4.main (testlog4.java: 10 ). 8) % x: The NDC associated with the current thread (nested Diagnostic Environment), especially for applications with multiple clients and multithreading such as Java Servlets. 9) %: Output A "%" character. 10) % F: name of the file where the ou
text. For example:1) % 20c: specify the name of the output category. The minimum width is 20. If the category name is smaller than 20, it is right aligned by default.2) %-20C: specify the name of the output category. The minimum width is 20. If the category name is smaller than 20, the "-" sign specifies the left alignment.3) %. 30C: specify the name of the output category. The maximum width is 30. If the
applications with multiple clients and multithreading such as Java Servlets. # // % L: location where the log event is output, equivalent to % C. % m (% F: % L) combination, including the category name, the thread that occurs, and the number of lines in the code. Example: testlog4.main (testlog4.java: 10) # % F: name of the file where the output Log message is generated, Class Name (*. java) # // % L: The line number in the output Code # % m: the message specified in the output code, the specif
application startup.% C: the category of the output log, usually the full name of the class.% T: name of the thread that outputs the log event% L: the location where the output log event occurs. It is equivalent to a combination of % C. % m (% F: % L), including the category name, the thread that occurs, and the number of lines in the code. Example: testlog4.main (testlog4.java: 10)% X: NDC associated with the current thread (nested Diagnostic Environment), especially used in applications with
Log message was generated % L: Row Number % m in the output code: output the message specified in the Code, specific log information % N: Output A carriage return line break, Windows platform is "/R/N ", on UNIX platforms, for "/N" output log information, you can add modifiers between % and mode characters to control the minimum width, maximum width, and text alignment. For example: 1) % 20c: specify the name of the output category. The minimum width
are generally less scalable. This is why they must be optimized to make every CPU time slice (cycle) do more work. ----- Baidu encyclopedia
Ii. haproxy static and dynamic Separation
1) test Topology
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/49/EB/wKioL1Qe9MugkP_MAADGosqwg_k327.jpg "Title =" haproxy.png "alt =" wkiol1qe9mugkp_maadgosqwg_k327.jpg "/>
2) test environment preparation
S1 and S2 and haproxy servers are in the same network segment. Select vment3.
1) Modify S1 [[
Do the project is log4j output formatting parameters get bored, simply the relevant part of the API is roughly translated, the original see http://logging.apache.org/log4j/docs/api/org/apache/log4j/PatternLayout.html
Parameters
Description
Example
% C
Lists the full name of a logger namespace. If {
Example of parameters in the log4j configuration file
Output Display Media
Assume that the current logger namespace is "A. B. C"
% C
A. B. C
:
Java code
Sudo BBB-conf -- setip 10.1.161.138
Sudo BBB-conf -- setip 10.1.161.138
Then, if you need to restart, enter the following command to restart
Java code
Bbb-conf -- clean
Bbb-conf -- clean
Check whether you have a network connection.
Java code
Ping fvshi.com
Ping fvshi.com
If you get the information that eth0 is not connected, check whether the VM uses eht1:
Java code
Ifconfig-
Ifconfig-
The following information is displayed:
Java code
Eth1 link encap: Ethernet hw
/rfidtest. logLog4j. appender. R. MaxFileSize = 10 MBLog4j. appender. R. MaxBackupIndex = 1Log4j. appender. R. layout = org. apache. log4j. PatternLayoutLog4j. appender. r. layout. conversionPattern = % d {yyyy-MM-dd HH: mm: ss, SSS} % 5 p % t % c {1}: % L-% m % n
* Where rootLogger is the root logger and log4j.logger.com. Alvin. dao. AddUserDao is the logger of this class. If this parameter is set, the root logger will be overwritten.
3. Reference Information:
Parameters
Descrip
Three methods for configuring network IP addresses in RHEL7.0GuideThe NIC naming method in RHEL7 is changed from eth0, 1, 2 to enoXXXXX. En represents enthernet (Ethernet), o represents onboard (built-in), and a string of numbers is automatically generated by an index number of the motherboard to ensure its uniqueness. Compared with the original naming method, this new method is long and hard to remember. However, it has the unique number and is not prone to errors during system migration.1. Mod
Nic cannot start. The following error is reported:[Root @ localhost Desktop] # service network restartShutting down loopback interface: [OK]Bringing up loopback interface: [OK]Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0 '.[FAILED]When you execute the ifconfig command, you will find that the configuration file of the eth1 Nic is/etc/sysconfig/network-scripts/ifcfg-eth0.
[Root @ localhost network-scripts] # ifconfig | grep addrEth1 Link
the network service. eth1 can be used normally.
5. Now you can use the Xshell tool to connect.
#ifconfig
eth1Linkencap:EthernetHWaddr00:0C:29:60:15:0F
inetaddr:192.168.2.100Bcast:192.168.2.255Mask:255.255.255.0
inet6addr:fe80::20c:29ff:fe60:150f
/64
Scope:Link
UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1
RXpackets:60errors:0dropped:0overruns:0frame:0
TXpackets:67errors:0dropped:0overruns:0carrier:0
collisions:0txqueuelen:1000
RXbytes:6219(6.0K
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.