log4e
log4e copied to clipboard
Cannot create dynamic Logs
Hello Log4E team,
As per the documentation, you can create a log as simple as: (log4e:deflogger "url" "%t [%l] %m" "%H:%M:%S" '((error . "error") (info . "info")))
(url--log-enable-logging)
Later,I tried to put this in a function. As simple as accepting a string and putting it in name of url, firs as a string and later as a symbol, them funcall. However, log4e:deflogger will not execute.
Later I found that it was because it was a macro, so I tried to add (macroexpand) and also tried (macro-expand) without luck.
How can I have a function so that I can create dynamic logs?
Thanks!
I'm trying something like:
(log4e:deflogger "url" "%t [%l] %m" "%H:%M:%S" '((error . "error")
(info . "info")))
(defun aaa (string)
`(log4e:deflogger ,string "%t [%l] %m" "%H:%M:%S" '((error . "error")
(info . "info"))))
(macroexpand-all (aaa "something")
)
(url--log-enable-logging)