scrollview. requestdisallowintercepttouchevent (false); then the outer ontouch permission will be lost, so that the listview canIf you get the ontouch permission, the listview will be able to roll.
The problem is: there is only one permission, and both views must be supported for scrolling. This is a bit difficult to implement ..
In fact, this is not difficult. When the finger reaches the listview, The scrollview outside is handed over the permission. When the finger is released, the scroll
Step 1:
Add and apply Log4net. dll. Add the following configuration board to the Web. config file.
Copy codeThe Code is as follows:
Step 2:
Create a Log4Net. config configuration file and add the following configuration information:
Copy codeThe Code is as follows:
Step 3:
Add the following code to the Application_Start event in the Global. asax file:
Copy codeThe Code is as follows: protected void Application_Start (object sender, EventArgs e)
{
// Code that runs on application s
Transferred from: http://zochen.iteye.com/blog/616151Simple implementation of the use of the JDK class Java.util.logging.Logger to record the log. The main reason is to use configuration files to configure the output of the log in the log4j manner. There are many articles on the web about how to use Java.util.logging.Logger, but there is no complete way to configure the configuration file to achieve control log output data. The purpose of this article is to welcome the shooting of bricks.On the
, disable Juli ' s shutdown hooks since//shutdown hooks run in parallel and log message s may lost//if Juli ' s hook completes before the Catalinashutdownhook () Logmanager Logmanager
= Logmanager.getlogmanager (); if (Logmanager instanceof Classloaderlogmanager) {(ClaSsloaderlogmanager) Logmanager).
Logmanager does not actively create a non-existent directory, but instead reports an exception as follows:
Can ' t load log handler ' Java.util.logging.FileHandler ' java.io.IOException:Couldn ' t get lock for c:/imessengerlogs/log% G.log java.io.IOException:Couldn ' t get lock for C:/imessengerlogs/log%g.log at Java.util.logging.FileHandler.openFiles (Unknown Source) at java.util.logging.filehandler.
Therefore, you must read the directory of the
);
Void warn (Object message );
Void error (Object message );
Void fatal (Object message );
// Each of the preceding methods has an overloaded method to support exception handling.// Every overload method is shown as follows, with an additional parameter of the exception type.Void debug (Object message, exception ex );//...// Boolean attribute is used to check the log level of logger// (We will see the log level later)Bool isdebugenabled;Bool isinfoenabled;//... Boolean attribute corresponding
object does not explicitly specify the log source using the LOGP () method, logrecord will find its own log source based on the call.
Logmanager: logmanager is a global object in singleton mode. It manages multiple logger objects and Log service. By default, logmanager is the LIB/Logging. properties reads the configuration information of the log system.
developers can filter the logs they are interested in many logs.1.2 logmanager
Logmanager is a management class that creates new logs for the type, but tracks all logs and log listening. to return a log of a specified class, you can use the following code.
private static readonly ILog Log = LogManager.GetCurrentClassLogger();
1.3 Use code to record logs
Using the code to record logs, the ilog interfac
additional parameter of the exception type.
VoidDebug (ObjectMessage, Exception ex );
//...
// Boolean attribute is used to check the log level of Logger
// We will see the log level soon)
BoolIsDebugEnabled;
BoolIsInfoEnabled;
//... Boolean attribute corresponding to other methods
}
The Log4net Framework defines a class called LogManager to manage all logger objects. It has a static GetLogger () method that uses the name param
the configuration file to "copy always ". In this way, the configuration file will be automatically deployed to the directory where *. EXE is located. In this way, nlog can automatically search for and load the configuration file without any settings.
Next, let's configure the log output. In the
layout="${longdate}|${level}|${message}"/>
When you enter the above code, you can see that Visual Studio's smart sensing function plays a role: EnterXsi:The list of available output ta
To learn how log4net works, we can start with the following context. The statement log4net. logmanager. getlogger (). Info ("Hello World!") in your program !"); The following internal workflow is triggered for log4net. Don't worry about what the above object (appender/filter, etc.) is. Let's look at this process first, let's touch the working context of log4net, and then let's get through one by one.
1. The first thing is to find the scheduling (
classification levels in the configuration file.
2
2
2
2
2 L call log4net code
Code calling is roughly like this:
Add reference using log4net;
L private static readonly ILog logger = LogManager. GetLogger ("ProjectManagement ");
L record any information, including exceptions
L logger. Error (Server. GetLastError ());
Details about how to use LogManager. GetLogger:
The following content is extracted fro
To learn how Log4net works, we can start with the following context. The statement log4net. LogManager. GetLogger (). Info ("hello world!") in your program !"); The following internal workflow is triggered for log4net. Don't worry about what the above object (Appender/Filter, etc.) is. Let's look at this process first, let's touch the working context of log4net, and then let's get through one by one.
1. The first thing is to find the scheduling (
basically shows the structure of the entire component, which is a logging component in the product, including 3 parts:
Logmanager is a concrete implementation of EJB, the above code is intercepted from the Logmanager.
Logmanagercommon is where EJB stores interfaces, and places public methods and variables related to log calls and storage. Logmanger need to rely on this project
Commonclass
to record all log events. Only logs that meet the requirements will be passed to the Appenders. Because LoggerConfig needs to pass events to Appenders, it has a series of Appenders references.Appender
It is only their capability to accept or reject logger requests. Log4j allows the log printing service to print data to multiple destinations. In Log4j, an output destination corresponds to an Appdender. Currently, the Appender can be console, files, remote socket servers, Apache Flume, JMS, remot
JDK1.4 provides a logging package: java. util. logging, which can be used to control the log records in the program. For example, you can specify the Log Level and log location (console, file, socket, memory buffer), or create a sub-recorder, you can use the program control method to specify the content you want to record, or you can use the configuration file to specify the content without modifying the program. Compared with Log4j, Log4j is simpler and lighter. It is undoubtedly a better choic
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.