Coder Social home page Coder Social logo

sharplispers / log4cl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 7max/log4cl

80.0 80.0 9.0 1.63 MB

Common Lisp logging framework, modeled after Log4J

License: Apache License 2.0

Emacs Lisp 13.81% Common Lisp 85.97% Java 0.22%
logging syslog

log4cl's People

Contributors

dkochmanski avatar fukamachi avatar hdasch avatar knobo avatar naryl avatar scymtym avatar slyrus avatar tmccombs avatar xach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

log4cl's Issues

Sly integration

Hey! I love this software, it really changed my logging life!
Recently I switched to Sly from Slime and I am struggling to get the interactive features and colorization working. Does any body know if someone already approached this, or if not any suggestions for me to start a contribution like 'log4sly'?

Thanks in advance

File appender error

Hi,
I am not sure if this is a bug or not.

ERROR - Caught SB-INT:SIMPLE-FILE-ERROR
 couldn't rename
home/manage/bluets/nasm/./logs/log.txt
to
 /home/manage/bluets/nasm/./logs/./logs/log.txt.20230204:
No such file or directory
Appender #<LOG4CL-IMPL:DAILY-FILE-APPENDER {10084486C3}> disabled

Thanks.

log4cl not working anymore with SBCL 1.4.16

I am using log4cl with SBCL 1.4.16 on macOS with Emacs 26.1 and get the following error when invoking slime

Can’t load log4slime lisp support: COMPILE-FILE-ERROR while compiling #<SWANK-LOADER-FILE "swank" "swank-loader">.

I have no further information and do not know how to investigate this. I was using log4cl in the past without any issue. As far as I can tell the issue came up with the update to sbcl 1.4.16. Can anyone confirm this issue?

cleanup: use semaphores for bordeaux-threads

Previously BT didn't have semaphores implementation – it does now. Last year we've removed dependency on bt-semaphore in favour of hand-crafted CV-based solution. We should revert part of this pull request: #18 and use semaphore interface from BT now (file watcher.lisp).

This task does not require deep understanding of log4cl internals whatsoever and may be solved by beginners to get involved into the project.

Exception on windows SBCL 2.0.0

I get this exception on windows only (context Ragnaroek/dandelion#6). Same code works on macOS and Linux, though. SBCL versions are newer on macOS and Linux.

Maybe somebody can point me to the right direction why it is failing like this?

debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1001400523}>:
The value
#<SB-KERNEL:UNKNOWN-TYPE LOG4CL-IMPL:APPENDER>
is not of type
SB-KERNEL:CLASSOID

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.

(SB-KERNEL:CLASSOID-TYPEP #<SB-KERNEL:LAYOUT for LOG4CL-IMPL:DAILY-FILE-APPENDER {1002D82013}> #<SB-KERNEL:UNKNOWN-TYPE LOG4CL-IMPL:APPENDER> #<LOG4CL-IMPL:DAILY-FILE-APPENDER {1002F50E83}>)
0]

Should this work on Mac OS X?

Has this ever worked on Mac OS X?

When I tried to load this on a Mac, it complains that semaphore functions are not defined, which seems right (sionescu/bordeaux-threads#56).

I also checked out v1.1.2 to try it before the switch back to bordeaux-threads semaphores, and it would not load either.

Method name not shown from within an iterate loop using sbcl

Using sbcl the method name is empty in the log message from the method not-working. With ccl or omitting the (aref...) statement it is working. Could someone please confirm this? I assume iterate does something log4cl can not understand, neither do I...

(ql:quickload "iterate")
(ql:quickload "log4cl")

(defpackage :minimal
  (:use #:cl #:iterate)) 

(in-package :minimal)

(defclass test ()
  ((a :documentation "test-a"
      :initform (make-array '(3 3)
			    :element-type 'integer
			    :initial-element 0)
      :initarg :a)))

(defvar *a* (make-instance 'test))

(defmethod not-working ((test test))
  (with-slots (a) test
    (iter
      (for i below 3)
      (iter
        (for j below 3)
        (unless (= 10 (aref a i j)) 
          (log:info "R: ~D C: ~D" i j))))))

(defmethod working ((test test))
  (with-slots (a) test
    (loop
      for i below 3
      do (loop
           for j below 3
           unless (= 10 (aref a i j))
             do (log:info "I: ~D J: ~D" i j)))))

(defmethod also-working ((test test))
  (with-slots (a) test
    (iter
      (for i below 3)
      (iter
        (for j below 3)
        (unless (= 10 j) 
          (log:info "R: ~D C: ~D" i j))))))

(not-working *a*)
(working *a*)
(also-working *a*)

log4slime seems broken on SBCL-2.3.7

:info:build ; caught ERROR:
:info:build ;   READ error during COMPILE-FILE:
:info:build ;   
:info:build ;     Lock on package SB-C violated when interning LAMBDA-PARENT while in package
:info:build ;     LOG4CL-IMPL.
:info:build ;   See also:
:info:build ;     The SBCL Manual, Node "Package Locks"
:info:build ;   
:info:build ;     (in form starting at line: 97, column: 0, position: 3722)
:info:build ; compilation aborted after 0:00:00.015
:info:build Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
:info:build                                                           {10013C0073}>:
:info:build   COMPILE-FILE-ERROR while
:info:build   compiling #<CL-SOURCE-FILE "log4cl" "src" "naming-sbcl">

Right click on category fails with Emacs 27.1 and later

With emacs 27.1 and later, following the demonstration in the README, a mouse right click on a category results in a wrong-type-arugment error. This is a regression in Emacs, not an issue with log4slime. I mention it here to leave breadcrumbs for anyone else encountering the issue.

The issue has been reported to debbugs here: https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-08/msg00753.html

Until a fix is available, this dubious bit of code should provide as a workaround:

(eval-after-load 'log4slime
  '(when (and
          (version<= "27.1" emacs-version)
          (version< emacs-version "28.0"))
    (defun easy-menu-do-define (symbol maps doc menu)
     ;; We can't do anything that might differ between Emacs dialects in
     ;; `easy-menu-define' in order to make byte compiled files
     ;; compatible.  Therefore everything interesting is done in this
     ;; function.
     (let ((keymap (easy-menu-create-menu (car menu) (cdr menu))))
      (when symbol
       (set symbol keymap)
       (defalias symbol
         `(lambda (event) ,doc (interactive "@e")
            ;; FIXME: XEmacs uses popup-menu which calls the binding
            ;; while x-popup-menu only returns the selection.
            (x-popup-menu event
             (or (and (symbolp ,symbol)
                  (funcall
                   (or (plist-get (get ,symbol 'menu-prop)
                        :filter)
                    #'identity)
                   (symbol-function ,symbol)))
              ,symbol))))
       ;; These symbols are commands, but not interesting for users
       ;; to `M-x TAB'.
       (function-put symbol 'completion-predicate #'ignore))
      (dolist (map (if (keymapp maps) (list maps) maps))
       (define-key map
         (vector 'menu-bar (if (symbolp (car menu))
                               (car menu)
                             ;; If a string, then use the downcased
                             ;; version for greater backwards compatibility.
                             (intern (downcase (car menu)))))
         (easy-menu-binding keymap (car menu))))))

    (log4slime-redefine-menus)))

Is it possible to specify the level of an appender?

So far I've been able to specify the log level of categories, but I would like to know if it is possible to set the level of appenders instead. I wonder if a category can have two appenders with different levels.

I appreciate the help.

Error while compiling watcher.lisp

Hi,

I try to quickload log4cl, but failed:

COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "log4cl" "src" "watcher">
   [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]

And *slime-repl sbcl* buffer:

; file: /home/whatacold/quicklisp/dists/quicklisp/software/log4cl-20170124-git/src/watcher.lisp
; in: DEFUN START-HIERARCHY-WATCHER-THREAD
;     (LOG4CL-IMPL:LOG-DEBUG "Watcher thread already started")
; 
; caught ERROR:
;   during macroexpansion of (LOG-DEBUG "Watcher thread already started"). Use
;   *BREAK-ON-SIGNALS* to intercept.
;   
;    The value
;      "WITHOUT-INTERRUPTS-BODY-1"
;    is not of type
;      LIST

I use SBCL, is it a bug, or do I miss something?
Thank.

Request for registration to quicklisp

Hi, sharplispers teams.

First of all, I would like to thank you for the maintenance of log4cl over the years.
The log4cl is working fine and I am using it conveniently.

Currently, 7max/log4cl, which is registered in quicklisp, does not seem to be maintained and does not seem to work with the newly released sbcl 2.3.3.
A fix for this is included in this repository, but it is not registered in quicklisp and cannot be used without explicitly git cloning it as a workaround.

I would therefore like to request that the log4cl registered with quicklisp be switched from 7max/log4cl to sharplispers/log4cl.
I believe that other users will benefit if this change is put in place.
Thank you in advance for your time and I hope you will accept my request.

If you have any other ideas, things I can do, etc., please let me know.

Best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.