From 71a7c39292eef91d732c0b98e3939032c5ae338b Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sun, 12 Oct 2025 23:27:25 +0300 Subject: Replace my simple logging implementation with log4cl --- src/bot/impl.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/bot/impl.lisp') diff --git a/src/bot/impl.lisp b/src/bot/impl.lisp index 85f4496..652e2f7 100644 --- a/src/bot/impl.lisp +++ b/src/bot/impl.lisp @@ -1,10 +1,11 @@ ;; SPDX-License-Identifier: EUPL-1.2 ;; SPDX-FileCopyrightText: 2025 Uko Kokņevičs (defpackage :ukkoclot/bot/impl - (:use :c2cl :iterate :ukkoclot/config :ukkoclot/log) + (:use :c2cl :iterate :ukkoclot/config) (:import-from :anaphora :aand :acond :it) (:import-from :cl+ssl) (:import-from :dex) + (:import-from :log) (:import-from :ukkoclot/strings :lisp->snake-case) (:local-nicknames (:jzon :com.inuoe.jzon)) @@ -17,7 +18,7 @@ (defgeneric parse-value (type json) (:documentation "Parse value of TYPE from the parsed JSON") (:method (type json) - (log-error "I don't know how to parse simple type ~A!" type) + (log:error "I don't know how to parse simple type ~A!" type) (error "I don't know how to parse simple type ~A!" type)) (:method ((type (eql 'boolean)) json) (check-type json boolean) @@ -100,9 +101,9 @@ ((gethash "ok" hash) (parse-value type (gethash "result" hash))) ((aand (gethash "parameters" hash) (gethash "retry_after" it)) - (log-info "Should sleep for ~A seconds" it) + (log:info "Should sleep for ~A seconds" it) (sleep it) - (log-info "Good morning!") + (log:info "Good morning!") (do-call% bot method uri type args-encoded)) (t (error "TG error ~A: ~A ~:A" (gethash "error_code" hash) @@ -112,5 +113,5 @@ (defun do-call (bot method path type args) (let ((uri (concatenate 'string (bot-base-uri bot) path)) (args-encoded (fixup-args args))) - (log-debug "~A .../~A ~S" method path args-encoded) + (log:debug "~A .../~A ~S" method path args-encoded) (do-call% bot method uri type args-encoded))) -- cgit v1.2.3