Permalink
Browse files

Added Apache 2.0 license

  • Loading branch information...
1 parent b9c73f8 commit 6f39ec174451f8a19e2e4f30200a2c2702c9399e Max Mikhanosha committed Feb 26, 2012
View
202 LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 1999-2005 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
View
6 NOTICE
@@ -0,0 +1,6 @@
+Log4CL logging framework for Common Lisp.
+Copyright (c) 2012, Max Mikhanosha
+
+This product includes software developed by Max Mikhanosha
+(max.mikhanosha@gmail.com)
+
View
13 log4cl.asd
@@ -1,4 +1,17 @@
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
(defpackage :log4cl.system
(:use :cl :asdf))
View
41 src/appender-base.lisp
@@ -1,7 +1,21 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
-;; Base APPENDER class and generics that logging core needs to know
-;; about
+;; Base APPENDER class and generics that logging core needs to see
(defclass appender ()
((layout :initform (make-instance 'simple-layout)
@@ -86,9 +100,22 @@ PROPERTY-TYPES function"))
(defgeneric property-alist (instance)
(:documentation "Should return list of valid object properties, each
element of the list being (INITARG SLOT TYPE) with INITARG being the
-keyword, SLOT is the slot name for the property and TYPE one of
-(member '(NUMBER BOOLEAN STRING)). Overriding this method to add extra
-properties is the only thing needed to allow extra properties in
-custom appenders/layouts to be configurable from by property file
-configurator. See also PROPERTY-INITARG-FROM-STRING"))
+keyword, SLOT is the slot name for the property and TYPE one of:
+
+Type | Description
+------------------------|------------------------------------------------------
+NUMBER or :NUMBER | Integer property, converted by (parse-integer)
+------------------------|------------------------------------------------------
+BOOLEAN or :BOOLEAN | Boolean, accepts \"true\" \"t\" \"on\" \"false\"
+ | \"off\" \"nil\" and empty string
+------------------------|------------------------------------------------------
+STRING or :STRING | Value as-is after the equal sign in NAME = <value>
+ | Whitespace is not stripped
+------------------------|------------------------------------------------------
+:STRING-SKIP-WHITESPACE | Value with the leading whitespace removed
+
+Overriding this method to add extra properties is the only thing
+needed to allow extra properties in custom appenders/layouts to be
+configurable from by property file configurator. See also
+PROPERTY-INITARG-FROM-STRING"))
View
86 src/appender.lisp
@@ -1,5 +1,19 @@
-(in-package #:log4cl-impl)
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+(in-package #:log4cl-impl)
(defmethod property-alist ((instance appender))
"Abstract appender has no properties"
@@ -43,13 +57,16 @@ obtained on each output by calling APPENDER-STREAM function.
Properties:
- - IMMEDIATE-FLUSH :: When non-NIL will call FINISH-OUTPUT after
- every log message
+IMMEDIATE-FLUSH
+
+: When non-NIL will call FINISH-OUTPUT after every log message
- - FLUSH-INTERVAL :: When set, will only flush if previous flush was
- earlier than FLUSH-INTERVAL seconds ago. In addition a background
- thread will be used to flush all appenders with FLUSH-INTERVAL
- set. See ADD-WATCH-TOKEN"))
+FLUSH-INTERVAL
+
+: When set, will only flush if previous flush was earlier than
+FLUSH-INTERVAL seconds ago. In addition a background thread will be
+used to flush all appenders with FLUSH-INTERVAL set. See
+ADD-WATCH-TOKEN"))
(defmethod property-alist ((instance stream-appender))
'((:immediate-flush immediate-flush boolean)
@@ -77,7 +94,7 @@ use FIXED-STREAM-APPENDER class"))
#+bordeaux-threads
(defmethod appender-added :after (logger (appender stream-appender))
"Add appender to the watch tokens in the current hierarchy,
-unless :IMMEDAITE-FLUSH property is set."
+unless IMMEDAITE-FLUSH property is set."
(declare (ignore logger))
(with-slots (immediate-flush)
appender
@@ -198,10 +215,13 @@ name"))
"File appender that periodically checks if it needs to rollover the
log file.
-Calls to MAYBE-ROLL-FILE will be made when current time advances past
-the boundary that is evenly divisible by %ROLLOVER-CHECK-PERIOD.
+Properties:
+
+ROLLOVER-CHECK-PERIOD
-%ROLLOVER-CHECK-PERIOD is specified in seconds"))
+: An integer, when current time advances past the boundary evenly divisible by this
+number a call to MAYBE-ROLL-FILE will be made to check if log file needs
+to be rolled over"))
(defmethod property-alist ((instance rolling-file-appender-base))
(append (call-next-method)
@@ -216,19 +236,33 @@ the boundary that is evenly divisible by %ROLLOVER-CHECK-PERIOD.
;; The name that the currently active file will be renamed into
(%next-backup-name :initform nil))
(:documentation "An appender that writes to the file named by
-expanding FILENAME pattern. The expansion is done by the same
+expanding a pattern. The expansion is done by the same
converter as the %d conversion pattern of the PATTERN-LAYOUT, which is
-a subset of patterns supported by POSIX strftime function. UTC-P slot
-controls if date pattern expansion uses local or GMT time, default is
-local.
+a subset of patterns supported by strftime POSIX function.
-Each time an event is logged, and current time is greater or equal to
-%ROLLOVER-CHECK-PERIOD boundary, both NAME-FORMAT and
-BACKUP-NAME-FORMAT (if present) will be expanded.
+Properties:
+
+NAME-FORMAT
+ : Expanded with date formatter to get the name of the current log file
+
+BACKUP-NAME-FORMAT
+ : Expanded with date formatter to get the name of the backup log
+ file
+
+UTC-P
+ : Should be non-NIL if name and backup patterns expand the UTC time
+ instead of local. Defaults to NIL.
+
+MAYBE-ROLL-FILE method works as follows. It expands both name and
+backup format (if present).
If either of them differs from their previous values, current log file
-will be closed, and a new log file named after expanding NAME-FORMAT
-will be opened. The old log file will be renamed to %NEXT-BACKUP-NAME
+will be closed, and a new current log file will be opened.
+
+The old log file will be renamed to %NEXT-BACKUP-NAME, which is a
+value of the backup format expansion remembered when original log file
+was opened. The new value of the backup format expansion is
+remembered in the %NEXT-BACKUP-NAME slot.
In below examples it is assumed that current log file was created an
2012-02-21, and the event being logged is the first one on the next
@@ -306,13 +340,13 @@ CHECK-PERIOD seconds "
(defgeneric backup-log-file (appender log-filename backup-filename)
(:documentation "Should move or rename LOG-FILENAME into the
- BACKUP-FILENAME. When this function is called, LOG-FILENAME is
- already closed.
+BACKUP-FILENAME. When this function is called, LOG-FILENAME is already
+closed.
- Implemented as generic function so its possible to write extensions
- that compress the backup log files automatically, or append
- to them. One possible extension could be having daily log file
- and a weekly backup, that is appended to each day")
+Implemented as generic function so its possible to write extensions
+that compress the backup log files automatically, or append to
+them. One possible extension could be having daily log file and a
+weekly backup, that is appended to each day")
(:method (appender log-filename backup-filename)
(declare (ignore appender))
(rename-file log-filename backup-filename)))
View
107 src/configurator.lisp
@@ -1,3 +1,21 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
+;;;
+;;; Contains (log-config) function and default logging initialization
+;;;
(in-package #:log4cl-impl)
(defun clear-logging-configuration ()
@@ -38,50 +56,51 @@ If not specified, default logger will be root logger
Valid options can be:
-|-------------+---------------------------------------------------------------|
-| :INFO | Or any other keyword identifying a log level, which can be |
-| :DEBUG | shortened to its shortest unambiguous prefix, such as :D |
-|-------------+---------------------------------------------------------------|
-| :CLEAR | Removes log level and appenders from any child loggers, |
-| | appenders are not removed from non-additive loggers |
-|-------------+---------------------------------------------------------------|
-| :ALL | Changes :CLEAR to remove appenders from non-additive |
-| | loggers |
-|-------------+---------------------------------------------------------------|
-| :SANE | Removes logger appenders, adds console appender with |
-| | pattern layout that makes messages look like this: |
-| | |
-| | : [11:22:25] INFO {category.name} - message |
-|-------------+---------------------------------------------------------------|
-| :OWN | For :SANE and :DAILY makes logger non-additive |
-| | otherwise additive flag will be set |
-|-------------+---------------------------------------------------------------|
-| :DAILY FILE | Adds file appender logging to the named file, which will |
-| | be rolled over every midnight into FILE.YYYYMMDD; Removes any |
-| | other other appenders that subclass FILE-APPENDER-BASE from |
-| | the logger. If :SANE is also specified, all logger appenders |
-| | are removed, but console appender is not added |
-|-------------+---------------------------------------------------------------|
-| :CONSOLE | Forces adding of console appender if :DAILY was specified |
-|-------------+---------------------------------------------------------------|
-| :PATTERN | For :SANE option uses specified conversion pattern instead |
-| STRING | of default one |
-|-------------+---------------------------------------------------------------|
-| :TWOLINE | Changes default pattern layout to print user log message |
-| | log message on 2nd line after the headers |
-|-------------+---------------------------------------------------------------|
-| :SELF | Used for debugging LOG4CL itself. Instead of root logger, |
-| | make default logger LOG4CL:SELF and remember all arguments |
-| | in the variable *SELF-LOG-CONFIG*, so that they are restored |
-| | even on (CLEAR-LOGGING-CONFIGURATION). Automatically assumes |
-| | :OWN making the LOG4CL-IMPL:SELF logger non-additive |
-|-------------+---------------------------------------------------------------|
-| :PROPERTIES | Configure with PROPERTY-CONFIGURATOR by parsing specified |
-| FILE | properties file |
-|-------------+---------------------------------------------------------------|
-| :WATCH | Used with :PROPERTIES, uses watcher thread to check |
-| | properites file modification time, and reloads if it changes |
-|-------------+---------------------------------------------------------------|
+ Option | Description
+-------------|---------------------------------------------------------------
+ :INFO | Or any other keyword identifying a log level, which can be
+ :DEBUG | shortened to its shortest unambiguous prefix, such as :D
+-------------|---------------------------------------------------------------
+ :CLEAR | Removes log level and appenders from any child loggers,
+ | appenders are not removed from non-additive loggers
+-------------|---------------------------------------------------------------
+ :ALL | Changes :CLEAR to remove appenders from non-additive
+ | loggers
+-------------|---------------------------------------------------------------
+ :SANE | Removes logger appenders, adds console appender with
+ | pattern layout that makes messages look like this:
+ |
+ | : [11:22:25] INFO {category.name} - message
+-------------|---------------------------------------------------------------
+ :OWN | For :SANE and :DAILY makes logger non-additive
+ | otherwise additive flag will be set
+-------------|---------------------------------------------------------------
+ :DAILY FILE | Adds file appender logging to the named file, which will
+ | be rolled over every midnight into FILE.YYYYMMDD; Removes any
+ | other other appenders that subclass FILE-APPENDER-BASE from
+ | the logger. If :SANE is also specified, all logger appenders
+ | are removed, but console appender is not added
+-------------|---------------------------------------------------------------
+ :CONSOLE | Forces adding of console appender if :DAILY was specified
+-------------|---------------------------------------------------------------
+ :PATTERN | For :SANE option uses specified conversion pattern instead
+ STRING | of default one
+-------------|---------------------------------------------------------------
+ :TWOLINE | Changes default pattern layout to print user log message
+ | log message on 2nd line after the headers
+-------------|---------------------------------------------------------------
+ :SELF | Used for debugging LOG4CL itself. Instead of root logger,
+ | make default logger LOG4CL:SELF and remember all arguments
+ | in the variable *SELF-LOG-CONFIG*, so that they are restored
+ | even on (CLEAR-LOGGING-CONFIGURATION). Automatically assumes
+ | :OWN making the LOG4CL-IMPL:SELF logger non-additive
+-------------|---------------------------------------------------------------
+ :PROPERTIES | Configure with PROPERTY-CONFIGURATOR by parsing specified
+ FILE | properties file
+-------------|---------------------------------------------------------------
+ :WATCH | Used with :PROPERTIES, uses watcher thread to check
+ | properites file modification time, and reloads if it changes
+-------------|---------------------------------------------------------------
Examples:
View
26 src/defs.lisp
@@ -1,13 +1,35 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
;;
+;; Global variables and constants
+;;
;; Define the log levels. Similar to Log4J, except that we add extra
;; nice log levels named "user1" through "user9" with "trace" log
;; level in-between user4 and user5
;;
;; Reasoning behind extra levels is:
;;
-;; 1. Unlike log4j the design of log4cl allows for mulitple log levels
-;; to be enabled simultaneously.
+;; Unlike log4j the design of log4cl allows for mulitple log levels to
+;; be enabled simultaneously. This is currently not used, but may be
+;; used in the future
+;;
+;; This will allow for more fine grained control of logging in the
+;; future where it would be possible to enable TRACE but not DEBUG or
+;; INFO
;;
(defconstant +log-level-unset+ 16)
(defconstant +log-level-user9+ 15)
View
103 src/demacs-integration.lisp
@@ -1,103 +0,0 @@
-
-(cl:in-package #:log4cl-impl)
-
-(defgeneric wrap-with-logger-name (definer forms logger-name))
-
-(defgeneric create-logger-name (definer)
- (:documentation "Generate automatic logger name for the definer.")
- (:method ((definer definer))
- (let ((symb (demacs::name-of definer)))
- (format nil "~a.~a"
- (shortest-package-name *package*)
- symb)))
- ;; for methods, append the types of non-T specializers after the method name
- #-sbcl
- (:method ((definer demacs:method-definer))
- (multiple-value-bind
- (specializers qualifiers)
- (if (keywordp (demacs::lambda-list-of definer))
- ;; handle the case of (def method foo :after
- ;; (&lambda-list)) in above case demacs should have given
- ;; an error but instead it has lambda-list as :after and
- ;; the actual lambda list is CAR of the body.
- ;;
- ;; Since I defined a lot of my after methods with above technically
- ;; invalid syntax, support it here
- (values
- (first (demacs::body-of definer))
- (list (demacs::lambda-list-of definer)))
- (values
- (demacs::lambda-list-of definer)
- (demacs::qualifiers-of definer)))
- (let (;; make a method description in the form of
- ;; (method-name qualifiers (types of args)
- ;; for example (a :after (STRING T (EQL 'BLAH)))
- (method-description
- `(,(demacs::name-of definer)
- ,@qualifiers
- ,(loop for arg in specializers
- if (atom arg) collect t else
- collect (second arg)))))
- ;; the method qualifiers will be appended with : after method name
- ;; ie logger for initialize-instance :around ((foo bar) &key) will be
- ;; package.initialize-instance:around.bar
- (flet ((ensure-string (atom)
- (cond
- ((keywordp atom) (prin1-to-string atom))
- ((symbolp atom) (symbol-name atom))
- ((stringp atom) atom)
- (t (prin1-to-string atom)))))
- (reduce
- (lambda (name1 name2)
- (concatenate 'string (ensure-string name1)
- "." (ensure-string name2)))
- (append (list (shortest-package-name *package*))
- (list method-description))))))))
-
-;; default method do not do anything
-(defmethod wrap-with-logger-name ((definer definer) forms logger-name)
- (declare (ignore definer logger-name))
- forms)
-
-;; for clisp wrapping into compiler-let works as intented
-;; (ie very well)
-#+clisp
-(defmethod wrap-with-logger-name ((definer definer) forms logger-name)
- `(cl-user::compiler-let ((*default-logger-name* ,logger-name))
- ,forms))
-
-;; In SBCL the compiler-let seems to be broken a bit.. Putting defclass/defstruct
-;; defmacro/defconstant inside of (compiler-let) or (let) causes the corresponding
-;; object to be only defined after the whole file is loaded. Its not to say that
-;; the ANSI def* form must be on the top level, SBCL seems ok with these being inside
-;; of (progn) but wrapping them into let/compiler-let breaks things.
-;;
-;; Therefore for SBCL define just these definers that we know do work
-#+nil
-(defmethod wrap-with-logger-name ((definer function-definer) forms logger-name)
- `(progn
- (eval-when (:compile-toplevel :execute)
- (setq *default-logger-name* ,logger-name))
- ,forms
- (eval-when (:compile-toplevel :execute)
- (setq *default-logger-name* nil))))
-
-;; ;; its a subclass of function-definer, so have to overwrite it to do nothing
-;; #+sbcl
-;; (defmethod wrap-with-logger-name ((definer macro-definer) forms logger-name)
-;; forms)
-;; ;; same thing for the method
-;; #+sbcl
-;; (defmethod wrap-with-logger-name ((definer method-definer) forms logger-name)
-;; forms)
-
-#-sbcl
-(defmethod expand-definer :around ((definer definer))
- (let ((logger-category (create-logger-name definer)))
- (let ((forms
- (call-next-method)))
- (wrap-with-logger-name definer forms logger-name))))
-
-
-
-
View
15 src/hierarchy-base.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defvar *hierarchy-max* 1
View
27 src/hierarchy.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
#+sbcl
@@ -57,6 +72,15 @@ package"
(defun add-watch-token (token &key
(test #'equal) key
(hierarchy (current-hierarchy)))
+ "Add unique watch token to the HIERARCHY, uniqueness is determined
+by TEST and KEY arguments which are passed to FIND and REMOVE. Any
+matching token is already present, the old token is removed and new
+one is inserted.
+
+The per-hierarchy lock is held doing the operation.
+
+Automatically starts hierarchy watcher thread, if it was not already started
+"
(with-slots (watch-tokens) hierarchy
(with-hierarchy-lock (hierarchy)
;; remove first, in case caller got the test wrong initially,
@@ -68,6 +92,9 @@ package"
(defun remove-watch-token (token &key
(test #'equal) key
(hierarchy (current-hierarchy)))
+ "Removes the watch token from the hierarchy, that matches the
+specified KEY and TEST arguments, which are passed to REMOVE
+function. Holds per-hierarchy lock doing its operation"
(with-slots (watch-tokens) hierarchy
(with-hierarchy-lock (hierarchy)
(setf watch-tokens (remove token watch-tokens :test test :key key)))))
View
23 src/impl-package.lisp
@@ -1,6 +1,25 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
+;; Implementation package for LOG4CL, that can be included in the :USE
+;; list of other packages. All logging functions that otherwise would
+;; conflict with CL package or with common words are named with LOG-
+;; prefix
;;
-;; Package declaration for log4cl
-;;
+;; Use this package if you are extending LOG4CL or writing your own
+;; appenders
(cl:defpackage #:log4cl-impl
View
15 src/layout.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defclass layout () ()
View
32 src/logger.lisp
@@ -1,21 +1,42 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
;;; Most of the logger internals.
;;;
;;; Note this file can not use any of the logging functions, as
;;; logging-macros.lisp had not yet complied.
;;;
-;;; So any code that uses self-logging to log4cl:self logger, needs to be
-;;; in the files that are later in the system definition file
+;;; So any code that uses self-logging to log4cl:self logger, needs to
+;;; be in the files that are later in the system definition file
;;;
(in-package #:log4cl-impl)
-;; these needs to be in separate file from the their definitions
+;;
+;; These needs to be in separate file from the their definitions. I'm
+;; actually unable to see SBCL generating code any differently with
+;; these present, maybe even with speed 3 safety 0
+;;
#+sbcl
(declaim (sb-ext:always-bound
*log-indent*
*ndc-context* *log-event-time*
*inside-user-log-function*))
+;; Circularity, *root-logger* needs to be referenced by logger
+;; creation function which we need to be defined so we can defvar the
+;; root logger
(declaim (special *root-logger*)
(type logger *root-logger*)
(type fixnum *log-indent*)
@@ -24,6 +45,7 @@
log-level-to-lc-string
log-event-time))
+;; Per-hierarchy logger state
(defstruct logger-state
;; List of appenders attached to this logger
(appenders nil :type list)
@@ -38,7 +60,7 @@
;; ADJUST-LOGGER recalculates this value
(mask 0 :type fixnum))
-;; actual logger
+;; Actual logger object
(defstruct (logger (:constructor create-logger)
(:print-function
(lambda (logger stream depth)
@@ -63,7 +85,7 @@
(depth 0 :type fixnum)
;; Child loggers. Only set when any child loggers are present
(child-hash nil :type (or null hash-table))
- ;; Per-hierarchy configuration
+ ;; Per-hierarchy state array
(state (map-into (make-array *hierarchy-max*) #'make-logger-state)
:type (simple-array logger-state *)))
View
15 src/logging-macros.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defmacro with-log-indent ((&optional (indent '(1+ *log-indent*)))
View
15 src/naming-sbcl.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defun include-block-debug-name? (debug-name)
View
15 src/naming.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defgeneric log-level-from-object (obj package)
View
15 src/package.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(cl:in-package #:log4cl-impl)
(macrolet ((log4cl-defpackage ()
View
15 src/pattern-layout.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
View
15 src/property-configurator.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defclass property-configurator (property-parser)
View
15 src/property-parser.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
;; generic property file parser, can be reused for other stuff
View
15 src/self-logger.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(cl:in-package #:log4cl-impl)
(defmethod package-log-category ((pkg (eql *package*)) categories explitic-p)
View
15 src/simple-layout.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defclass simple-layout (layout) ()
View
15 src/watcher.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-impl)
(defvar *watcher-thread-bindings* `((*debug-io* . ,*debug-io*)))
View
14 tests/log4cl.properties
@@ -1,4 +1,16 @@
-# test properties file
+# Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+#
+# This file is licensed to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
log4cl:rootLogger = INFO, file1, console
log4cl:appender:console = log4cl:console-appender
View
15 tests/test-appenders.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-test)
(in-suite test)
View
15 tests/test-category-separator.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(cl:defpackage :log4cl-test.dots
(:use :cl :log4cl-impl :stefil))
View
15 tests/test-configurator.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-test)
(in-suite test)
View
15 tests/test-layouts.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-test)
(in-suite test)
View
15 tests/test-logger.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(cl:defpackage :log4cl-test
(:use :cl :log4cl-impl :stefil)
(:export :test :speed
View
15 tests/test-speed.lisp
@@ -1,3 +1,18 @@
+;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;
+;;; Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+;;;
+;;; This file is licensed to You under the Apache License, Version 2.0
+;;; (the "License"); you may not use this file except in compliance
+;;; with the License. You may obtain a copy of the License at
+;;; http://www.apache.org/licenses/LICENSE-2.0
+;;;
+;;; Unless required by applicable law or agreed to in writing, software
+;;; distributed under the License is distributed on an "AS IS" BASIS,
+;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+;;; See the License for the specific language governing permissions and
+;;; limitations under the License.
+
(in-package #:log4cl-test)
(in-root-suite)
View
17 tests/test.java
@@ -1,3 +1,20 @@
+// Copyright (c) 2012, Max Mikhanosha. All rights reserved.
+//
+// This file is licensed to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//
+// Used to test log4j vs log4cl speed
+//
+
import org.apache.log4j.*;
public class test

0 comments on commit 6f39ec1

Please sign in to comment.