Menu

#795 logger does not print correct args when passed multiple args

open-later
logger (8)
3
2006-07-03
2006-04-05
No

(bin) 49 % package require logger
0.6.2
(bin) 50 % set f [logger::init foo]
::logger::tree::foo
(bin) 51 % ${f}::debug foo bar baz
[Wed Apr 05 17:41:43 Westeuropäische Normalzeit 2006]
[bar] [debug] 'baz'
(bin) 52 %

This should print:
'foo bar baz'

seems like the origin tracking code is not robust enough.

Michael

Discussion

  • Michael Schlenker

    • status: open --> open-later
     
  • Michael Schlenker

    Logged In: YES
    user_id=302287

    Investigated this further and it is rooted deep inside the
    implementation. Basically this is a user error that is uncaught.

    There is no easy fix to this, unless i completely rework the
    internal linkage structure.

     
  • Hemang Lavana

    Hemang Lavana - 2007-02-12

    Logged In: YES
    user_id=81875
    Originator: NO

    Although specifying multiple arguments may be a user error, I would like to see logger package support such multiple arguments. I need to pass multiple arguments so that my custom log proc can invoke argument specific actions. Consider the following example:

    ${f}::debug -subst {List of files = [glob -nocomplain *]}

    In above, the message is enclosed within curly braces so glob command is not invoked when debug level is disabled. However, if -subst flag is present and debug level is enabled, my custom proc can invoke [subst $msg] in the caller's context to get the list of files and print them in the log msg.