<commit_before>;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;
;;; Copyright (c) 2012, <NAME>. 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 ()
             (labels ((reexport-from (name names)
                        `((:import-from ,name ,@names)
                          (:export ,@names)))
                      (level-expr-syms ()
                        ;; make SEXP-<LEVEL> symbols for all debug levels
                        (loop for sym in +log-level-macro-symbols+
                              collect (make-symbol (format nil "~a-~a"
                                                           (string '#:sexp)
                                                           (string sym)))))
                      (shadow-and-export (syms)
                        `((:shadow ,@syms)
                          (:export ,@syms))))
               `(defpackage #:log4cl
                  (:use)
                  (:nicknames #:log)
                  ,@(reexport-from
                     '#:log4cl-impl
                     '(;; class names
                       #:fixed-stream-appender
                       #:console-appender
                       #:file-appender
                       #:daily-file-appender
                       #:property-configurator
                       #:simple-layout
                       #:pattern-layout
                       #:clear-logging-configuration
                       #:reset-logging-configuration
                       ;; utility stuff
                       #:make-logger
                       #:configure
                       #:add-appender
                       #:remove-appender
                       #:remove-all-appenders
                       #:logger-additivity
                       #:logger-appenders
                       #:effective-appenders
                       #:effective-log-level
                       #:logger-category
                       #:logger-name
                       #:logger-parent
                       #:logger-children
                       #:logger-descendants
                       #:logger-depth
                       #:logger-log-level
                       #:log-sexp-with-level
                       ;; customization
                       #:naming-option
                       #:log-level-from-object
                       #:resolve-logger-form
                       #:resolve-default-logging-form
                       #:enclosing-scope-block-name
                       #:reset-logging-configuration
                       #:clear-logging-configuration
                       #:naming-option
                       #:package-wrapper
                       #:map-logger-children
                       #:map-logger-descendants
                       #:start-hierarchy-watcher-thread 
                       #:stop-hierarchy-watcher-thread
                       #:add-watch-token
                       #:remove-watch-token
                       #:watch-token-check
                       #:log4cl-error
                       #:log4cl-error))
                  (:import-from :cl #:in-package)
                  ,@(shadow-and-export
                     `(#:sexp #:expr #:config #:make ,@+log-level-symbols+ ,@(level-expr-syms)
                              #:with-hierarchy
                              #:with-package-hierarchy
                              #:in-package-hierarchy
                              #:in-hierarchy
                              #:with-indent))
                  ;; one letter logging macro forwarders
                  (:shadow #:f #:e #:w #:i #:d #:u1 #:u2 #:u3 #:u4 #:t #:u5 #:u6 #:u7 #:u8 #:u9 #:c #:s)
                  (:export #:f #:e #:w #:i #:d #:u1 #:u2 #:u3 #:u4 #:t #:u5 #:u6 #:u7 #:u8 #:u9 #:c #:s)))))
  (log4cl-defpackage))

(defmacro forward-logging-macro (name from-name)
  `(defmacro ,name (&rest args)<commit_msg>Added *root-logger* to export list<commit_after>;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;
;;; Copyright (c) 2012, <NAME>. 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 ()
             (labels ((reexport-from (name names)
                        `((:import-from ,name ,@names)
                          (:export ,@names)))
                      (level-expr-syms ()
                        ;; make SEXP-<LEVEL> symbols for all debug levels
                        (loop for sym in +log-level-macro-symbols+
                              collect (make-symbol (format nil "~a-~a"
                                                           (string '#:sexp)
                                                           (string sym)))))
                      (shadow-and-export (syms)
                        `((:shadow ,@syms)
                          (:export ,@syms))))
               `(defpackage #:log4cl
                  (:use)
                  (:nicknames #:log)
                  ,@(reexport-from
                     '#:log4cl-impl
                     '(;; class names
                       #:fixed-stream-appender
                       #:console-appender
                       #:file-appender
                       #:daily-file-appender
                       #:property-configurator
                       #:simple-layout
                       #:pattern-layout
                       #:clear-logging-configuration
                       #:reset-logging-configuration
                       ;; utility stuff
                       #:make-logger
                       #:configure
                       #:add-appender
                       #:remove-appender
                       #:remove-all-appenders
                       #:logger-additivity
                       #:logger-appenders
                       #:effective-appenders
                       #:effective-log-level
                       #:logger-category
                       #:logger-name
                       #:logger-parent
                       #:logger-children
                       #:logger-descendants
                       #:logger-depth
                       #:logger-log-level
                       #:log-sexp-with-level
                       ;; customization
                       #:naming-option
                       #:log-level-from-object
                       #:resolve-logger-form
                       #:resolve-default-logging-form
                       #:enclosing-scope-block-name
                       #:reset-logging-configuration
                       #:clear-logging-configuration
                       #:naming-option
                       #:package-wrapper
                       #:map-logger-children
                       #:map-logger-descendants
                       #:start-hierarchy-watcher-thread 
                       #:stop-hierarchy-watcher-thread
                       #:add-watch-token
                       #:remove-watch-token
                       #:watch-token-check
                       #:log4cl-error
                       #:log4cl-error
                       ;; variables
                       #:*root-logger*))
                  (:import-from :cl #:in-package)
                  ,@(shadow-and-export
                     `(#:sexp #:expr #:config #:make ,@+log-level-symbols+ ,@(level-expr-syms)
                              #:with-hierarchy
                              #:with-package-hierarchy
                              #:in-package-hierarchy
                              #:in-hierarchy
                              #:with-indent))
                  ;; one letter logging macro forwarders
                  (:shadow #:f #:e #:w #:i #:d #:u1 #:u2 #:u3 #:u4 #:t #:u5 #:u6 #:u7 #:u8 #:u9 #:c #:s)
                  (:export #:f #:e #:w #:i #:d #:u1 #:u2 #:u3 #:u4 #:t #:u5 #:u6 #:u7 #:u8 #:u9 #:c #:s)))))
  (log4cl-defpackage))

(defmacro forward-logging-macro (name from-name)
  `(defmacro ,name (&rest args)
{'fraction_non_alphanumeric': 0.11437335670464505, 'fraction_numerical': 0.007668711656441718, 'mean_word_length': 1.0505390835579516, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6912605', 'n_tokens_mistral': 2424, 'n_tokens_neox': 2135, 'n_words': 523}