Previous articles are stuck here for backup
Purpose:1. Write a fatal-level error to the 2000nt log2. Send email notification to administrators for warn, error, and fatal errors3. Other errors are output directly in the background.
Tutorial steps:Output to 2000nt log1. Copy the nteventlogappender. dll in the log4j compressed package to the WINNT/system32 directory.2. Write the configuration file log4j. properties.
# System log output in 2000Log4j. Log
First, log4j configuration
The first step: Join Log4j-1.2.8.jar to Lib.
Step two: Establish the log4j.properties under the classpath. The contents are as follows:
If you put it under SRC, you don't have to configure it or you have to go to Web.xml to configure a listener
Reference:
Log4j.rootcategory=info, stdout, R log4j.appender.stdout=org.apache.log4j.consoleappender log4j.appender.stdout . Layout=org.apache.log4j.patternlayout LOG4J.APPENDER.STDOUT.LAYOUT.CONVERSIONPATTERN=[QC]%p [%t]%C.%M
tracecontext class provides two methods: Write and warn, which allow the statement to be written to the tracking record. Each method is overloaded and allows you to specify the trace type, text message, and optional error information. The only difference between the two methods is that the warn method displays its text in red.
[Note] When you specify a category in calling the write or
the object class. The trace attribute in the page object is an instance of the tracecontext class. The tracecontext class provides two methods: Write and warn, which allow the statement to be written to the tracking record. Each method is overloaded and allows you to specify the trace type, text message, and optional error information. The only difference between the two methods is that the warn method dis
function4, modify the configuration file, the log output to the consolelog4j profile is: # # # Set level and destination (here multiple Destinations) # # #Log4j.rootlogger = Debug,console# # # Here's me is the package, that is, in this package logging, is only the debug and above the level of loggingLog4j.logger.me=debug# # # Output to console # # #Log4j.appender.CONSOLE = Org.apache.log4j.ConsoleAppenderLog4j.appender.CONSOLE.Target = System.outLog4j.appender.CONSOLE.layout = Org.apache.log4j.
Today I do a download function of Android, using the Tomcat on my machine to do the server, on Tomcat download things, but the Android system is always prompt error said cannot connect to my tomcat, but I clearly started the Tomcat service Ah, And the code I also checked the good changed, no mistake ah, this is to give me depressed bad, I believe many beginners will have such experience, hehe ... Really overwhelmed, quite let people depressed, I here and you share a solution, hehe ... Find me th
data to the hdfs: // 10.232.42.91: 19000/input directory and run wordcount to check the effect.
$ cd hadoop/share/hadoop/mapreduce$ hadoop jar hadoop-mapreduce-examples-2.0.3-alpha.jar wordcount hdfs://10.232.42.91:19000/input hdfs://10.232.42.91:19000/output13/03/07 21:08:25 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable13/03/07 21:08:26 INFO service.AbstractService:
.
Combined with the Saved Jobs mechanism, you can automatically update and assign values for the last-value field when Incrementally Updating a Job during repeated scheduling. Combined with the cron or oozie scheduled scheduling, you can achieve real incremental update.
Experiment: Create and execute incremental jobs create incremental update job: fulong @ FBI006 :~ /Sqoop/sqoop-1.4.4/bin $ sqoop job -- create incretest -- import -- connect jdbc: Oracle: thin: @ 192.168.0.138: 1521: orcl --
First, IntroductionLOG4J is an Apache open source project, by using log4j, we can control the destination of log information delivery is console, file, GUI component, even socket server , NT Event recorder, UNIX syslog daemon, etc. We can also control the output format of each log, and by defining the level of each log information, we can control the log generation process more carefully. Log4j consists of three important components: the priority of the log information, the output destination of
-Dspark.deploy.recoveryDirectory=/nfs/spark/recovery"
1.2 Test
1. Start the spark standalone cluster: [[email protected] spark] #./sbin/start-all.sh
2. Start a spark-shell client and do some operations, then use sbin/stop-master.sh to kill the master Process
[[Email protected] spark] # Master = spark: // bigdata001: 7077 bin/spark-shell
[[Email protected] spark] #./sbin/stop-master.sh
3. Test Result: You can see the information in bigdata003 and cannot connect to the master.
14/08/26 13:54:01
Today, we are working on a download function for Android, using Tomcat on our own machine as a server and downloading things on Tomcat. However, the android system always prompts that it cannot be connected to my tomcat, however, I started the Tomcat service clearly, and the code changed after I checked it. No error, but it turned me down. I believe many beginners will have this experience, haha... I am so overwhelmed and quite depressing. I will share with you the solution here... if you find m
}-%msg%n ".Logback's configurationLogback the focus should be Appender, Logger, Pattern, before this is a simple look at Logback's
Scan: When scan is set to True, when the configuration file changes, it will be reloaded and the default is True
Scanperiod: Detects if the configuration file has a modified interval, if no unit of time is given, the default is milliseconds, and the default time interval is 1 minutes when scan=true is in effect.
Debug: When set to True, Logback inte
Heartbeat error: attempted replay attack, heartbeatattempted
Two lvs servers are configured for heartbeat hot backup. However, an error is reported after the configuration is started:
Jan 28 15:50:22 usvr-211 heartbeat: [2266]: ERROR: should_drop_message: attempted replay attack [usvr-210]? [Gen = 1418354318, curgen = 1418354319]Jan 28 15:50:24 usvr-211 heartbeat: [2266]: WARN: nodename usvr-210 uuid changed to usvr-211Jan 28 15:50:24 usvr-211 heartbe
Heartbeat error attempted replay attack
Two lvs servers are configured for heartbeat hot backup. However, an error is reported after the configuration is started:
Jan 28 15:50:22 usvr-211 heartbeat: [2266]: ERROR: should_drop_message: attempted replay attack [usvr-210]? [Gen = 1418354318, curgen = 1418354319]Jan 28 15:50:24 usvr-211 heartbeat: [2266]: WARN: nodename usvr-210 uuid changed to usvr-211Jan 28 15:50:24 usvr-211 heartbeat: [2266]:
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.