[log5-devel] Bug in printing arguments
Venkatesan S
svtesan at gmail.com
Wed Dec 8 15:01:06 UTC 2010
Now, the variable output works fine. But, I hit another bug:
(log5:start-sender 'mylog
(log5:stream-sender :location *error-output*
:category-spec '(log5:info)
:output-spec '(log5:message)))
When I try to define a sender like the above, I get:
There is no output-specification named NIL. Use defoutput to define output
specifications before using them in a sender.
[Condition of type LOG5::OUTPUT-NOT-FOUND-ERROR]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING
{1003569571}>)
Backtrace:
0: (LOG5::BUILD-HANDLE-MESSAGE-FN #<LOG5:STREAM-SENDER MYLOG
{1003B542E1}>)
1: ((SB-PCL::FAST-METHOD INITIALIZE-INSTANCE :AFTER (LOG5:BASIC-SENDER))
#(3 NIL) #<unused argument> #<LOG5:STREAM-SENDER MYLOG
{1003B542E1}>)[:EXTERNAL]
2: ((SB-PCL::EMF INITIALIZE-INSTANCE) #<unused argument> #<unused
argument> #<LOG5:STREAM-SENDER MYLOG {1003B542E1}> 5864078772937 12)
3: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #<unavailable argument>
#<unavailable argument> #<STANDARD-CLASS LOG5:STREAM-SENDER>)[:EXTERNAL]
4: (LOG5::START-SENDER-FN MYLOG NIL NIL LOG5:STREAM-SENDER)[:EXTERNAL]
5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LOG5:START-SENDER 'MYLOG
(LOG5:STREAM-SENDER :LOCATION *ERROR-OUTPUT* :CATEGORY-SPEC '(LOG5:INFO+)
:OUTPUT-SPEC ...)) #<NULL-LEXENV>)
--more--
I will try to see what the problem is, but with my limited lisp skills, I
might not get too far :)
Thanks for a great piece of code, and your sustained efforts!!
On Wed, Dec 8, 2010 at 10:15 PM, Gary King <gwking at metabang.com> wrote:
> Hi Venkatesan,
>
> I just updated github, etc. with the latest changes. Please let me know how
> they work for you and/or if you have any other comments or suggestions.
>
> thanks,
>
> On Dec 7, 2010, at 12:52 PM, Venkatesan S wrote:
>
> Thanks Gary. You rock :)
>
>
> On Wed, Dec 8, 2010 at 12:40 AM, Gary King <gwking at metabang.com> wrote:
>
>> Hi Venkatesan,
>>
>> Thanks for your question. You've stumbled on a bug that I've corrected
>> locally but mistakenly failed to update on github.
>>
>> I'll remedy this later today.
>>
>> My apologies for my oversite.
>>
>> regards,
>>
>>
>>
>> On Dec 7, 2010, at 8:29 AM, Venkatesan S wrote:
>>
>> Hi,
>>
>> I am a new user of log5 (and lisp in general). When I tried playing
>> around, I found that log5 has a problem printing variables. For eg,
>> >(setf a 15)
>> >(log-for (info) "a is ~a~%" a)
>>
>> [after setting up a sender and importing all symbols from log5]
>>
>> It prints:
>> 3500123556 (INFO) a is A
>>
>> I expected to see: a is 5
>>
>> Is there anything I am missing? I tried grokking the source, and tried
>> putting a , before value in the log-for macro like in:
>>
>> (defmacro log-for (category-spec message &rest args)
>> (if (%log-p category-spec)
>> `(let ((category (load-time-value
>> (update-category-spec nil ',category-spec)
>> t)))
>> (handle-message
>> (category-id category)
>> ,message
>> , at args))
>> *`(,values))*)
>>
>> But this did not help. Can anyone please let me know how to achieve what I
>> want? If it is useful, I am using sbcl 64 bit on Centos 5.5 and the latest
>> clog5 (v0.3.1)
>>
>> Thanks,
>> Venkatesan
>>
>>
>>
>> --
>> Audentis fortuna juvat
>> _______________________________________________
>> log5-devel mailing list
>> log5-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/log5-devel
>>
>>
>> --
>> Gary Warren King, metabang.com
>> Cell: (413) 559 8738
>> Fax: (206) 338-4052
>> gwkkwg on Skype * garethsan on AIM * gwking on twitter
>>
>>
>
>
> --
> Audentis fortuna juvat
>
>
> --
> Gary Warren King, metabang.com
> Cell: (413) 559 8738
> Fax: (206) 338-4052
> gwkkwg on Skype * garethsan on AIM * gwking on twitter
>
>
--
Audentis fortuna juvat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/log5-devel/attachments/20101208/1e88ef33/attachment.html>
More information about the Log5-devel
mailing list