Created
August 28, 2025 14:56
-
-
Save Lovesan/a7d53f465f6fbc11ba30c524087e3e80 to your computer and use it in GitHub Desktop.
logging-class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defclass logging-class (standard-class) | |
| ()) | |
| (defmethod slot-value-using-class :after ((class logging-class) obj slotd) | |
| (format t "Access to slot ~a of ~s ~%" | |
| (slot-definition-name slotd) | |
| obj)) | |
| (defmethod (setf slot-value-using-class) :after (new-value (class logging-class) obj slotd) | |
| (format t "Setting the slot ~a of ~s to value ~s ~%" | |
| (slot-definition-name slotd) | |
| obj | |
| new-value)) | |
| (defmethod validate-superclass ((class logging-class) | |
| (superclass standard-class)) | |
| t) | |
| (defclass my-object () | |
| ((x :initform nil :initarg :x :accessor my-x)) | |
| (:metaclass logging-class)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment