cremes.devlist@mac.com
2006-May-22 15:19 UTC
[Rails] logger and ActionWebService - how can I get them to work together?
I''m adding a web service to a small Rails app that I wrote to learn
the framework. This is my last piece of the puzzle and I''m having
trouble figuring out how to debug it.
I was attempting to iteratively develop the web service method using
TDD. There''s so much coercion and stuff going on via the
ActionWebService framework that I''m looking to fall-back to the tried
and true methodology of using print statements. However, I can''t seem
to get Logger to output anything to my ~/log/test.log file. Here''s an
example:
class LibraryServiceController < ApplicationController
wsdl_service_name ''LibraryService''
web_service_api LibraryServiceApi # format is <controller_name>Api
web_service_scaffold :invoke
def new_item(username, type, title, length, size, state, unique_key)
@user = User.find_by_login(username)
logger.fatal(@user)
puts @user
true
end
end
In #new_item I can''t get logger to output anything nor does my #puts
go anywhere that I can find. (BTW, the test passes without errors.)
Scouring the AWDR book and online resources has gotten me nowhere.
Can anyone provide a hint?
cr
