logger with a different name, each time it is a new logger, there is no problem adding multiple handler. PS: That's a stupid way to do it, but that's what I did before. )
Call RemoveHandler () to remove the handler from the logger after each log has been recorded as above.
In the log method, if the logger already has handler, the handler is no longer added.
Same as Method 2, but remove the handler from the Logger handler list with pop.
The following is a code example of Method
Many times when testing your own jar package functionality, a test project will need to import the jar package, but generally in debugging, you need to follow the steps and logic is correct, this time need to be in the source code of the jar package in the next breakpoint. Recently just oneself also will often do this, also met a similar problem, I believe many netizens will encounter, here I see a solution to paste out, the original post here: Http://www.tuicool.com/articles/aa6zyi, thank the a
public class feignconfiguration {@Bean public contract feignconfiguration () { return new feign. Contract.default (); }}.. But it will still be an error. The last discovery is feignconfiguration, the name of the class. I'll just do it. A name can start normally.May be the cause of @bean. Then I looked up the following:@Bean is a method-level annotation that is used primarily in @configuration annotated classes, or in @component annotated classes.The ID of the added bean is the metho
Jre:java Operating EnvironmentJdk:java Development Kit, including JRE (Javac, Java, JAVAP, jar, Javadoc, Javah, etc.)Jvm:java virtual MachinesPath:windows Environment variablesClasspth:java program Runtime class load path ( not javac required path at compile time, is the path required when Java command is run ) Configure CLASSPATH to. Represents the current directoryJava_home:windows System TEMP Variable systemroot (https://baike.baidu.com/item/SystemRoot/1786463)After the JDK installation is co
first kind of running time is much shorter than the second time. Although the first method has a hit problem, but the random number because of the use of linear and congruential, so in fact, in the random number of seed certain circumstances, The probability of each number is roughly equal, i.e., the probability of repetition is relatively small.But the second kind of performance loss is quite large, first of all, the principle of ArrayList, its bottom layer is the implementation of the array,
longer pre-checking for the same cross-domain request for the same time periodConfig.addallowedmethod ("OPTIONS");//the method that allows the request to be submitted, * indicates all allowedConfig.addallowedmethod ("HEAD"); Config.addallowedmethod ("GET");//request method to allow getConfig.addallowedmethod ("PUT"); Config.addallowedmethod ("POST"); Config.addallowedmethod ("DELETE"); Config.addallowedmethod ("PATCH"); Source.registercorsconfiguration ("/**", config); return Newcorsfilter (sou
Sinkholes!!!Believe that this step of the students in front of the work has been done, and directly say the key!!!The main is to configure the path variable, here win10 and other differences on the out, win the path variable, to use the absolute path of the JDK, and can not use%java_home% this class, the computer can not recognize.Look at the picture:WIN10 Configuring Java Environment variables to resolve javac not internal or external command issues
time of garbage collection will continue to increase correspondingly, the corresponding application pause time will also increase correspondingly . Some applications that require a high amount of time, such as a maximum pause time of hundreds of milliseconds, are likely to exceed this limit when the heap space is larger than a few grams, in which case garbage collection becomes a bottleneck for the system to run. To resolve this contradiction, there is a concurrent garbage collection algorithm
The problem is as follows:‘gbk‘ codec can‘t decode byte 0x80 in position 34: illegal multibyte sequenceIn fact, the solution is quite simple, the error prompted the "GBK" coding problem, then where will our code problems?1. Encoding SettingsThe first line is not set# _*_ coding:utf-8 _*_2, the subsequent processing of data without transcoding, such as the Open functionHandled as followswith open("data.txt",‘r‘,encoding=‘UTF-8‘) as data:The second thing I met is that the problem can be resolved b
The Great God of you:Recently the company intends to use PostScript language to develop a printer product, I am now on this aspect to understand, but about PostScript but know nothing, ask the big God in the garden have not known.I would like to ask you about the licensing of a programming language that Adobe introduced in the 80 's when the company was first established. The intention is this: our company recently in the development of a product, product design to the PostScript language develo
SolveFirst, the root cause of this problem is that the curses library does not support Windows. So after we download the python (Python comes with the curses library), although we can see the curses library in the python directory \lib , we can't use it. will produce the error as above. It is also true that you can find the from _curses import * in the prompt file __init__ file.To solve this problem, we need to use a unofficial curses (unofficial curses library) instead of Python's own curses li
In Ubuntu 14.04LTS with the command:/lib/libc.so.6, the hint "/lib/libc.so.6:not found", in fact, this library is existing, just place changed, under the "/lib/i386-linux-gnu/", We just need to create a link.Use the following command:For a bit:sudo ln-s/lib64/x86_64-linux-gnu/libc-2.13.so/lib64/libc.so.6for + bit:sudo ln-s/lib/i386-linux-gnu/libc-2.13.so/lib/libc.so.6This article is from the "happy Programming _ Endless" blog, please be sure to keep this source http://happyliu.blog.51cto.com/501
Recently in VMware to do ha double-click Hot Standby Experiment, the first network card is set to bridge mode, the second network card is set to NAT, the first NIC can get the address, the second NIC cannot get to the DHCP address, change to static address also not, the solution:Add a line of code to the two NICs:Nm_controlled= "No" This line of code means not to let NetManage management network card, restart the network card service, can normally get the address.This article is from the "david0
system logging facility to function properlyIn case file system running low of free disk space. Typically, the reserved space size is (disk size-inode size) * 5% Depending on the results of TUNE2FS, the reserved space size is as follows:[[email protected] log]# expr 6553515 \* 426214060 (KB)This value is exactly equal to the size-avail-used above.Summary, DF command results display Size Not equal to Avail + used, actually Avail + used = 0.95 * Size, remaining 0.05 reserved space.This size is a
/wKiom1aEpGSTRdcYAABA20oNN0U616.png "title=" Err_ Msg_can_not_find_modules_files.png "style=" Float:none; "alt=" Wkiom1aepgstrdcyaaba20onn0u616.png "/>Solution: The above information can be guessed, because the kernel file corresponding to the driver file is not found, so the system load is not normal.Since the upgrade kernel was not manually compiled, the file in my boot directory should have been generated when I executed Yum update, but because the Yum runtime was forced to abort, the reposit
Run after installing GVIM under Ubuntu 10.04, found unable to display Chinese menuAt the same time, the command line will also error:gtk-warning * *: Invalid input stringThe search was made because Ubuntu 10.04 default installation will set the Chinese locale to Zh_cn.utf8, while the Chinese locale recognized by GVIM is set to ZH_CN. UTF-8. So Gvim will be wrong at the start times and cannot load the Chinese menu properly. Here's how to fix it:Cd/usr/share/vim/vim72/langsudo ln-s Menu_zh_cn.utf-
Third-party libraries cannot be opened due to increased selinux privilege levels, which can be confirmed if Setenforce 0 is used. You need to add the appropriate permissions. Modify the Te permissions.To view the SELinux status:1,/usr/sbin/sestatus-v # #如果SELinux The status parameter is enabled is turned onSELinux status:enabled2. Getenforce # #也可以用这个命令检查To turn off SELinux:1, temporarily shut down (do not restart the machine):Setenforce 0 # #设置SELinux become permissive mode# #setenforce 1 set S
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.