[Sputnik-list] Sputnik on WSAPI, and almost zero-config

Yuri Takhteyev yuri at sims.berkeley.edu
Wed Jan 2 19:39:22 GMT+3 2008


> Just a note, I think you should add a require("logging." ..
> SPUTNIK_CONFIG.LOGGER) somewhere before you assume that
> logging[SPUTNIK_CONFIG.LOGGER] is non nil.

Not sure what you are referring to.  The logger is required in
sputnik/init.lua, line 39.  The actual logger module is only required
if SPUTNIK_CONFIG.LOGGER is set.  After that, all the code uses (or at
least should use) self.logger (or sputnik.logger) to log.  Note that
self.logger is available regardless of whether we are logging or not.
If we don't want to do logging we just set it to a dummy logger.

      require("logging")
      self.logger = logging.new(function(self, level, message) end)--
does nothing

That said, I think a few things should be changed in sputnik/init.lua:

    Line 4: removed (does nothing)
    Line 5: also removed
    Line 480 and 481: commented out, so that we default to no logging.

Also, I will add "lualogging" to the rockspec, since Sputnik wouldn't
run without it.

  - yuri

-- 
http://sputnik.freewisdom.org/



More information about the Sputnik-list mailing list