@@ -99,7 +99,7 @@ Following pattern characters are recognized:
99
99
%D date-time in local time, extra arguments can contain a strftime pattern
100
100
101
101
%h hostname of the system (implementation dependent, obtained once
102
- when pattern is parsed, and cached
102
+ when pattern is parsed, and cached
103
103
104
104
%t Current thread name
105
105
@@ -108,7 +108,7 @@ Following pattern characters are recognized:
108
108
%i Process id of the lisp process, implementation dependent.
109
109
110
110
%I Two spaces repeated *log-indent* times. Different padding string
111
- can be specified in an extra argument.
111
+ can be specified in an extra argument.
112
112
113
113
%n OS-dependent newline sequence.
114
114
@@ -258,7 +258,7 @@ Example: For the string {one}{}{three} will return the list (14
258
258
259
259
(defmethod parse-extra-args (fmt-info character pattern start)
260
260
" Default method does not parse any extra arguments and returns INFO
261
- unchanged"
261
+ unchanged"
262
262
(declare (ignore character pattern))
263
263
(values start fmt-info))
264
264
@@ -424,7 +424,7 @@ Example: For the string {one}{}{three} will return the list (14
424
424
425
425
(defun compile-pattern-format (layout pattern)
426
426
" Parses the pattern format and returns a function with lambda-list
427
- of \ ( STREAM STREAM LOG-LEVEL LOG-FUNC\ ) that when called will output
427
+ of (STREAM LOGGER LOG-LEVEL LOG-FUNC) that when called will output
428
428
the log message to the stream with the specified format."
429
429
(let ((idx 0 )
430
430
(str (make-array 0 :element-type ' character
@@ -518,10 +518,10 @@ the log message to the stream with the specified format."
518
518
519
519
(defgeneric format-time (stream pattern universal-time utc-p)
520
520
(:documentation " Prints UNIVERSAL-TIME to the STREAM according to
521
- strftime like PATTERN." ))
521
+ strftime like PATTERN." ))
522
522
523
523
(defun format-log-date (stream fmt-info utc-p)
524
- " Output the %d or %D pattern"
524
+ " Helper function to print either %d or %D (date/time) pattern"
525
525
(declare (type pattern-date-format-info fmt-info))
526
526
(with-slots (minlen maxlen date-format universal-time) fmt-info
527
527
(let* ((ut (or universal-time (log-event-time))))
@@ -534,13 +534,13 @@ the log message to the stream with the specified format."
534
534
(values ))
535
535
536
536
(define-pattern-formatter (#\d )
537
- " Output the %d pattern"
537
+ " Output the %d (UTC date/time) pattern"
538
538
(declare (ignore logger log-level log-func))
539
539
(format-log-date stream fmt-info t )
540
540
(values ))
541
541
542
542
(define-pattern-formatter (#\D )
543
- " Output the %D pattern"
543
+ " Output the %D (local date/time) pattern"
544
544
(declare (ignore logger log-level log-func))
545
545
(format-log-date stream fmt-info nil )
546
546
(values ))
@@ -712,7 +712,12 @@ the log message to the stream with the specified format."
712
712
(defclass pattern-newline-format-info (format-info)
713
713
((width :initarg :width )
714
714
(continue :initarg :continue ))
715
- (:documentation " Extra formatting flags for %n pattern" ))
715
+ (:documentation " Extra formatting flags for %n pattern. Currently
716
+ this is unused, but in the future it may be implemented so that
717
+ newline will be conditional, if underlaying stream supports
718
+ STREAM-LINE-COLUMN, so that instead of two-line pattern layout, we can
719
+ use conditional newline only user message does not fit on current
720
+ line" ))
716
721
717
722
(defmethod parse-extra-args (fmt-info (char (eql #\n )) pattern start)
718
723
(destructuring-bind (next-pos &optional width continue )
@@ -790,7 +795,7 @@ the log message to the stream with the specified format."
790
795
:indent-string (or indent-string " " )))))
791
796
792
797
(define-pattern-formatter (#\I )
793
- " Output %i (process id ) pattern"
798
+ " Output %I (current WITH-LOG-INDENT ) pattern"
794
799
(declare (ignore logger log-level log-func))
795
800
(let ((str (slot-value fmt-info ' indent-string)))
796
801
(if (and (zerop (slot-value fmt-info ' minlen))
0 commit comments