...
We all know squid will automatically cache static files, but for this dynamic Web page How to let it also cache it, so look for it on Google, find the above mentioned the cache of Google Earth blog article.
His approach is to:
ACL QUERY Urlpath_regex cgi-bin? Intranet
ACL Forcecache url_regex-i kh.google keyhole.com
No_cache Allow Forcecache
No_cache Deny QUERY
# ----
Refresh_pattern-i kh.google 1440 20% 10080 override-expire override-lastmod reload-into-
in the Lua script This is a little troublesome. However, I wrapped a luaplushelper. h file, which can easily complete this job. Its implementation is also very simple. You can obtain from the source code how to use pure luaplus to implement the same function. However, there is still a restriction that cannot be solved: Virtual member functions cannot be used. However, considering that we only call the C ++ function in Lua, it is not necessary to import C ++ to Lua perfectly. This restriction
, considering that we only call the C ++ function in Lua, it is not necessary to import C ++ to Lua perfectly. This restriction is completely acceptable.In addition, class member variables cannot be directly accessed in Lua, and can be accessed through class member functions (such as setvalue/getvalue ).
// The following is a simple C ++ class:Class Logger{Public:Void logmember (const char * message){Printf ("in member function: % s \ n", message );}
This article mainly from log4cxx level, layout, format, naming rules, filter several aspects introduced.
First, log4cxx naming rulesLogger is identified by the name of a string class, and the logger name is case-sensitive and has an inherited relationship between the names, with the parent name as the prefix, and the dot number. For example: X.y is X.y.z's father. A root logger (root
3. Complete Solution
Sunny developers decided to use the factory method mode to design the logger. Its basic structure is shown in 3:
Figure 3 log recorder Structure
In Figure 3, the logger interface acts as an abstract product. Its sub-classes filelogger and databaselogger act as specific products, the loggerfactory interface acts as an abstract factory, and its sub-classes fileloggerfactory and databasel
Make sure your Python version > Python 2.3 1 from a small case:Cat howto_logging.py #coding=utf8# file name: howto_logging# this file shows how to use logging# made by vasks, email:[emailprotected]import logging# 创建一个logger,级别:DEBUGlogger = logging.getLogger(‘Err_Logger‘)logger.setLevel(logging.DEBUG)# 创建一个handler,用于写入日志文件fh = logging.FileHandler(‘err.log‘)fh.setLevel(logging.DEBUG)# 再创建一个handler,用于输出到控制台ch = logging.StreamHandler()ch.setLevel(logg
Monolog follows the PSR3 interface specification and can easily be replaced with other log class libraries that follow the same specification. Monolog has a good extensibility, through the handler, formatter and processor these interfaces, can be a variety of Monolog class library extension and customization.
Basic usage
Monolog can be installed via GitHub or composer, and the following is the latest version to install using composer:
Composer require Monolog/monologWhat if you don't know wha
without altering any of the original log interfaces;
Back to top of pageLogs for single-threaded environmentsIn general, the log class is implemented as a singleton, making it easy to invoke. For simplicity, the write operation for the log code in the example is printed directly to the console. The following is the initial definition of the Logger class:Listing 1. Initial definition of the Logger clas
--------------------------------------------------------------------------------One: Introduction to LOG4J components
A: log4j three important components--loggers, appenders, Layouts
These three components work together to make it possible for developers to record information based on categories and levels of information, and to be able to run the control of information logging in a way that has been stored in a location.
B: Logger hierarchy (
Record logs in a unified mode
Recording logs of various levels is an indispensable function for all applications. There are too many third-party frameworks available for the implementation of log records, such as log4net, nlog, loggr, and serilog, of course, we can also choose the Microsoft native diagnostic framework (the relevant API is defined in the namespace "system. in diagnostics .. Net core provides an independent LOG model so that we can use a unified API to program log records. We can
prepare the basic knowledge
Four components of the logging
Loggers provides interfaces that applications can use directly
Handlers send logs to the appropriate destination
Filters provides a way to filter log information
Formatters specifying the Log display format
See the code below #!/usr/bin/env python#-*-coding:utf-8-*-#pyversion:p ython3.5#owner:fuzjimport Logginglogger = Logging.getlogger ("test.conf") #创建一个
The benefits of Log4j 2 will not be discussed with everyone. If you search for 2, it means you have some knowledge about it and want to use it, so you can get started directly here.
1. Download log4j 2 from the official website.To import the jar package, you only need to import the following two jar packages (xx is a messy version ):
Log4j-core-xx.jar
Log4j-api-xx.jar
2. Import to your project:This will not be said.
3. Start Using:
We know that to use log4j to record logs in a class, we only
People often get confused when they understand the IPv6 in the 3GPP/3GPP2 system, which is caused by the IPv6 at two different levels. First is the data load level, where the user data flow through the operator PLMN from MS to PDN. The other is the transport load level, which is two different logical levels from the data load level. Generally speaking, IPV6 will appear in the four areas of the 3GPP/3GPP2 standard. 2 at the user data load level, 2 at the transport load level.
One thing needs to
restriction that cannot be solved: Virtual member functions cannot be used. However, considering that we only call the C ++ function in Lua, it is not necessary to import C ++ to Lua perfectly. This restriction is completely acceptable.
In addition, class member variables cannot be directly accessed in Lua, and can be accessed through class member functions, such as SetValue/GetValue ).
// The following is a simple C ++ class:
Class Logger
{
[Blog recommendation] logging module of python Howto (1)
This blog post is from Bkjia. If you have any questions, go to the blog page for an interactive discussion!Blog: http://xdzw608.blog.51cto.com/4812210/1608718
This article comes from the understanding of the source code added to the howto-logging section in py2.7.9 docs. The official documentation link is as follows, I am using the downloaded pdf version, should be consistent: https://docs.python.org/2/howto/logging.ht
, China Mobile held 2016 annual technical work, containerized ICT Fusion prototype system debut technology work will show.
June 20, 2016 23rd, OPNFV Summit was held in Berlin, Germany. In the OPNFV POC Theater, China Mobile and red Hat jointly showcased the container-based ICT convergence platform
June 29, 2016, the GSMA hosted the 2016 World Mobile Conference-Shanghai (Mobile Worlds Congress, called MWC) at the Shanghai New International Expo Center, at the 5G Exhibition of China Mobile R
solve the above problems, you need to understand a few of the more important concepts,Logger,Handler,Formatter,FilterA few important concepts
The Logger recorder exposes an interface that the application code can use directly.
Handler processor that sends (logger-generated) log records to the appropriate destination.
Filter filters provide bette
?
Before you solve the above problems, you need to understand a few of the more important concepts,Logger,Handler,Formatter,Filter3. A few important concepts
The Logger recorder exposes an interface that the application code can use directly.
Handler processor that sends (logger-generated) log records to the appropriate destination.
Fil
log4jthree main componentsLoggers: A tool for logging logs, which is used to record the log information we want.Appenders (output source): Where the log output can be, console, file, stream location, database, and so on.Layouts (layout mode): The log needs to record which basic information, in what format to record the display of this information.A Logger must have at least one Appender, and a Appender has a Layout.LoggersThe
Logging Module Introduction
Python's logging module provides a common logging system that can be easily used by Third-party modules or applications. This module provides different log levels and can record logs in different ways, such as files, HTTP get/post,smtp,socket, etc., and can even implement specific logging methods for itself.The logging module is the same as the log4j mechanism, but the specific implementation details are different. module provides
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.