Permalink
Browse files

release notes + instructions on how to use the logger

  • Loading branch information...
1 parent 6b3a488 commit a5e1bb9cc9982cb8366a99f706840d35ccb7a613 @moonmaster9000 committed Aug 8, 2010
Showing with 16 additions and 1 deletion.
  1. +11 −0 CHANGELOG
  2. +5 −1 README.markdown
View
@@ -1,3 +1,14 @@
+v0.0.15
+now includes logging! To add to the log in your get/post/put/delete methods, simply call the "log" action with a string log message.
+if you want to plug in your own custom logger, set it in your MyApp/MyApp/Config.hs file:
+
+ config =
+ def {
+ birdLogger = myCustomLogger
+ }
+
+your custom logger method signature must be: Request -> (Request -> BirdResponder ()) -> IO Reply
+
v0.0.14
better "bird" command, thanks to @jasondew. "bird hatch MyApp" for a new app; "bird help" or "bird --help" for more info.
View
@@ -54,6 +54,7 @@ Note: make sure $HOME/.cabal/bin is in your PATH.
get [] = do
name <- param "name"
+ log "I'm about to greet a Jedi. Teehee!"
body $ "Greetings, " ++ (maybe "Jedi!" id name)
now recompile your app and start it flying:
@@ -106,11 +107,14 @@ Inside the function body, you can use the following methods (don't worry, this l
-- creates/updates a header
-- ex: get [] = body "Hello World" >> header "X-Powered-By" "BIRD!"
+ log :: String -> BirdResponder ()
+ -- adds to the log
+ -- ex: get [] = body "Hello World" >> log "Why did I just greet the world?"
+
## Notes
This project is *still* in its infancy. Coming features:
-* logging
* post/put/delete http param processing
* helpers for popular html generation solutions (Hamlet, HStringTemplate, HAXML, BlazeHTML, etc.)
* WAI support

0 comments on commit a5e1bb9

Please sign in to comment.