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
Chaining formatters?
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
  2 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
 
mkloster  
View profile  
 More options Aug 15 2012, 5:19 pm
From: mkloster <mikeklos...@gmail.com>
Date: Wed, 15 Aug 2012 14:19:00 -0700 (PDT)
Subject: Chaining formatters?

Can formatters be chained? That is, can a logger have multiple formatters
applied to it? It appears calling [logger setFormatter] replaces the
previous formatter.

Use case could be to use a formatter which applies a logging format, and
another which functions as a whitelist filter.

thanks,
Michael


 
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.
Discussion subject changed to "Re : Chaining formatters?" by Robbie Hanson
Robbie Hanson  
View profile  
 More options Aug 15 2012, 11:00 pm
From: Robbie Hanson <robbiehan...@deusty.com>
Date: Wed, 15 Aug 2012 20:00:40 -0700
Local: Wed, Aug 15 2012 11:00 pm
Subject: Re : Chaining formatters?

I've considered something like this in the past...  

When I was first designing lumberjack, and researching other logging frameworks, I noticed things like separation of filters and formatters and chained formatters, etc. Ultimately I decided to "keep it simple".  A formatter is a filter is a formatter. I felt that keeping the architecture conceptually simple (at least at this level) would pay off. My intent is that complexity can be added within the formatter itself. For example, one could craft a "formatter container" which accepts a list of independent formatters, and applies them serially. This allows for advanced techniques such as chaining, headers/footers, etc.

I hope this helps. Let me know your thoughts.  

--  
Robbie Hanson
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Le mercredi 15 août 2012 à 14:19, mkloster a écrit :


 
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 »