Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
best practices for logging in a Happstack application
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Norman Ramsey  
View profile  
 More options Aug 23 2012, 8:21 pm
From: Norman Ramsey <fellswal...@gmail.com>
Date: Thu, 23 Aug 2012 17:21:21 -0700 (PDT)
Local: Thurs, Aug 23 2012 8:21 pm
Subject: best practices for logging in a Happstack application

I am writing a new application and am interested in logging as one way of
debugging it.  I also might like to gather information about how the
application is used.

I found an old blog post that suggested happstack applications should log
using hslogger, aka System.Log.Logger.  This requires an IO action, which
is fine, but I am wondering if anyone here has ideas about best practices
for logging using combinators.  I would rather not just drop down log calls
everywhere; it feels too much like C programming.  I figure with
higher-order functions there must be a better way to manage logging.  Any
ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dag.odenhall@gmail.com  
View profile  
 More options Aug 23 2012, 10:30 pm
From: "dag.odenh...@gmail.com" <dag.odenh...@gmail.com>
Date: Fri, 24 Aug 2012 04:30:41 +0200
Local: Thurs, Aug 23 2012 10:30 pm
Subject: Re: best practices for logging in a Happstack application

Unrelated, but I posted a new comment on your SO question (duno if you get
a notice for that? I didn't for your comment.):

http://stackoverflow.com/questions/12047656/can-a-session-cookie-be-s...

As for logging, hslogger is used by default for logging requests in
Happstack, but it's just a default if you use nullConf and not a hard
requirement. For Happstack 8 hslogger will most likely be replaced with
something else. So for your own logging you can use whatever, although if
you're using the hslogger setup for request logging it might be neat to be
able to configure all logging together, with a single package. Not sure
what kind of logging combinators you're looking for, though? For debugging
it might be more useful to use things like traceStack/+RTS -xc, and compile
with -prof -fprof-auto (assuming GHC 7.4+). This produces stack traces
similar to those in other languages. Or are you looking for something else
entirely?

On Fri, Aug 24, 2012 at 2:21 AM, Norman Ramsey <fellswal...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Petter Bergman  
View profile  
 More options Aug 24 2012, 1:42 am
From: Petter Bergman <jon.petter.berg...@gmail.com>
Date: Fri, 24 Aug 2012 07:42:50 +0200
Local: Fri, Aug 24 2012 1:42 am
Subject: Re: best practices for logging in a Happstack application

For debugging, I have user Debug.Trace which I find very practical. It
might be a lot like C programming though, but I think this might be less of
a problem if you use it for debugging only and use a different, more
Haskell-y, way of  logging for other purposes.

2012/8/24 Norman Ramsey <fellswal...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Norman Ramsey  
View profile   Translate to Translated (View Original)
 More options Aug 24 2012, 11:40 am
From: Norman Ramsey <fellswal...@gmail.com>
Date: Fri, 24 Aug 2012 08:40:52 -0700 (PDT)
Local: Fri, Aug 24 2012 11:40 am
Subject: Re: best practices for logging in a Happstack application

I should clarify that I'm perfectly good using QuickCheck and Debug.Trace
as needed during development.
But during *deployment* I want some logging going on so that if something
strange happens, there will be bread crumbs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »