PageRenderTime 29ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/apache-log4j-1.2.17/contribs/KevinSteppe/mail-2002-03-27.txt

#
Plain Text | 118 lines | 89 code | 29 blank | 0 comment | 0 complexity | 8e204ba2fce90c55b619b293471933af MD5 | raw file
Possible License(s): Apache-2.0
  1. Licensed to the Apache Software Foundation (ASF) under one or more
  2. contributor license agreements. See the NOTICE file distributed with
  3. this work for additional information regarding copyright ownership.
  4. The ASF licenses this file to You under the Apache License, Version 2.0
  5. (the "License"); you may not use this file except in compliance with
  6. the License. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. Received: (qmail 12476 invoked from network); 28 Mar 2002 06:19:49 -0000
  14. Date: Wed, 27 Mar 2002 22:28:58 -0800
  15. From: Kevin Steppe <ksteppe@pacbell.net>
  16. Subject: Re: RollingFileAppender and DailyRollingFileAppender
  17. To: Log4J Users List <log4j-user@jakarta.apache.org>
  18. Reply-To: ksteppe@pacbell.net
  19. Message-id: <3CA2B82A.5C366593@pacbell.net>
  20. MIME-version: 1.0
  21. X-Mailer: Mozilla 4.7 [en] (WinNT; I)
  22. Content-type: multipart/mixed; boundary="Boundary_(ID_TnKsnil+d0oYB9TV0P+fgA)"
  23. X-Accept-Language: en
  24. References:
  25. <8DAB344CC3F3FE42A51FA1A8E295F8682ACD14@tepg-server2.tepgsyd.tycoint.com.au>
  26. X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
  27. I wrote a CompositeRollingAppender last August to do that. I'm attaching that
  28. code and some example config files to you separately.
  29. Ceki... Could you please put these files in the log4j/contribs/KevinSteppe
  30. folder of the available releases? This seems to be coming up occasionally and
  31. it would be more convenient to just point people there.
  32. Thanks,
  33. Kevin
  34. Janusz Dalecki wrote:
  35. > Is there a way of having the mixture of both RollingFileAppender and
  36. > DailyRollingFileAppender options?. I have a requirement to log daily and
  37. > delete old files weekly.
  38. > Thanks,
  39. > Janusz
  40. >
  41. > --
  42. > To unsubscribe, e-mail: <mailto:log4j-user-unsubscribe@jakarta.apache.org>
  43. > For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>
  44. #Config file for CompositeRollingAppender
  45. #This is an example config to use CompositeRollingAppender in Size based Backups only
  46. log4j.rootCategory=debug, R
  47. log4j.appender.R=org.apache.log4j.CompositeRollingAppender
  48. #How to perform rolling -- 1 = By Size
  49. #Note -- this is the only difference from RollingFileAppender!
  50. log4j.appender.R.RollingStyle=1
  51. #file to log to
  52. log4j.appender.R.File=example.log
  53. #Size Rolling params
  54. log4j.appender.R.MaxFileSize=10MB
  55. log4j.appender.R.MaxSizeRollBackups=10
  56. #layout options
  57. log4j.appender.R.layout=org.apache.log4j.PatternLayout
  58. log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
  59. #Config file for CompositeRollingAppender
  60. #This is an example config to use CompositeRollingAppender in Time based Backups only
  61. log4j.rootCategory=debug, R
  62. log4j.appender.R=org.apache.log4j.CompositeRollingAppender
  63. #How to perform rolling -- 2 = By Time
  64. #Note -- this is the only difference from DailyRollingFileAppender!
  65. log4j.appender.R.RollingStyle=2
  66. #file to log to
  67. log4j.appender.R.File=example.log
  68. #Date Rolling params
  69. log4j.appender.R.datePattern='.'yyyy-MM-dd
  70. #layout options
  71. log4j.appender.R.layout=org.apache.log4j.PatternLayout
  72. log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
  73. #Default Config file for CompositeRollingAppender
  74. log4j.rootCategory=debug, R
  75. log4j.appender.R=org.apache.log4j.CompositeRollingAppender
  76. #How to perform rolling -- Composite is the default
  77. log4j.appender.R.RollingStyle=3
  78. #Use same file name for all inprocess logging?
  79. log4j.appender.R.staticLogFileName=true
  80. log4j.appender.R.File=example.log
  81. #Size Rolling params
  82. log4j.appender.R.CountDirection=-1
  83. log4j.appender.R.MaxFileSize=5KB
  84. log4j.appender.R.MaxSizeRollBackups=10
  85. #Date Rolling params
  86. log4j.appender.R.datePattern='.'yyyy-MM-dd
  87. #layout options
  88. log4j.appender.R.layout=org.apache.log4j.PatternLayout
  89. log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n