Log4j. properties configuration file

Source: Internet
Author: User


Log4j. rootlogger = console, filelog4j.addivity.org. apache = true # apply to log4j on the console. appender. console = org. apache. log4j. leleappenderlog4j. appender. console. threshold = infolog4j. appender. console. target = system. outlog4j. appender. console. encoding = gbklog4j. appender. console. layout = org. apache. log4j. patternlayoutlog4j. appender. console. layout. conversionpattern = [framework] % d-% C-%-4r [% T] %-5 p % C % x-% m % N # create a log log4j every day. appender. a1 = org. apache. log4j. dailyrollingfileappenderlog4j. appender. a1.file = C:/log4j/loglog4j. appender. a1.encoding = gbklog4j. appender. a1.threshold = debuglog4j. appender. a1.datepattern = '. 'yyyy-MM-ddlog4j.appender.A1.layout = org. apache. log4j. patternlayoutlog4j. appender. a1.layout. conversionpattern = % d {absolute} % 5 P % c {1 }:% L: % m % N # apply to the file log4j. appender. file = org. apache. log4j. fileappenderlog4j. appender. file. file = C:/log4j/file. loglog4j. appender. file. append = falselog4j. appender. file. encoding = gbklog4j. appender. file. layout = org. apache. log4j. patternlayoutlog4j. appender. file. layout. conversionpattern = [framework] % d-% C-%-4r [% T] %-5 p % C % x-% m % N # apply to file rollback log4j. appender. rolling_file = org. apache. log4j. rollingfileappenderlog4j. appender. rolling_file.threshold = errorlog4j. appender. rolling_file.file = rolling. loglog4j. appender. rolling_file.append = truelog4j. appender. lele_file.encoding = gbklog4j. appender. rolling_file.maxfilesize = 10kblog4j. appender. rolling_file.maxbackupindex = 1log4j. appender. rolling_file.layout = org. apache. log4j. patternlayoutlog4j. appender. rolling_file.layout.conversionpattern = [framework] % d-% C-%-4r [% T] %-5 p % C % x-% m % N # custom appenderlog4j. appender. im = net. cybercorlin. util. logger. appender. imappenderlog4j. appender. im. host = Mail. cybercorlin. netlog4j. appender. im. username = usernamelog4j. appender. im. password = passwordlog4j. appender. im. recipient = [email protected] log4j. appender. im. layout = org. apache. log4j. patternlayoutlog4j. appender. im. layout. conversionpattern = [framework] % d-% C-%-4r [% T] %-5 p % C % x-% m % N # apply to socketlog4j. appender. socket = org. apache. log4j. rollingfileappenderlog4j. appender. socket. remotehost = localhostlog4j. appender. socket. port = 5001log4j. appender. socket. locationinfo = true # set up for log facter 5log4j. appender. socket. layout = org. apache. log4j. patternlayoutlog4j. appender. socet. layout. conversionpattern = [start] % d {date} [date] % N % P [Priority] % N % x [NDC] % N % T [thread] % N % C [Category] % N % m [Message] % N # log Factor 5 appenderlog4j. appender. lf5_appender = org. apache. log4j. lf5.lf5appenderlog4j. appender. lf5_appender.maxnumberofrecords = 2000 # Send Logs to log4j. appender. mail = org.apache.log4j.net. smtpappenderlog4j. appender. mail. threshold = fatallog4j. appender. mail. buffersize = 10 [email protected] log4j. appender. mail. smtphost = www. wusetu. comlog4j. appender. mail. subject = log4j message [email protected] log4j. appender. mail. layout = org. apache. log4j. patternlayoutlog4j. appender. mail. layout. conversionpattern = [framework] % d-% C-%-4r [% T] %-5 p % C % x-% m % N










Log4j. properties configuration file

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.