|
|
Sponsor |
Re: No Virtual Destructor for LoggingEvent: msg#00035apache.logging.log4cxx.user
On Dec 9, 2004, at 7:53 PM, Barak Simon wrote:
That situation sounds very similar to an approach that I've used for localization of log messages (http://www.mail-archive.com/log4j-user@xxxxxxxxxxxxxxxxxx/ msg00479.html) in a project using log4net. If you were careful on how you constructed your messages (for example, start with fixed content instead of variable content, did not allow your conversions to be affected by the default locale), you could create a fairly efficient localization (or in your case customization) mechanism by having a layout that would match the "generic" message and transform it into an appropriate localized content based on an external document containing regex patterns and substitutions. Since all that information was already embedded into the rendered message, it did not require any changes to the API or hacks to the dispatcher. Just a well designed layout implementation that used a hash map to narrow the considered regex's to avoid brute force searches. If there is enough info in the logging event to generate what you need, then it is simplest to generate at the layout or appender instead of trying to generate it before it hits the dispatcher and add it to the logging event. If there isn't enough info in the message already, then you need to have some mechanism to add it which is where I'd look at using the MDC or NDC, but could also be accomplished in several other ways.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: No Virtual Destructor for LoggingEvent, Barak Simon |
|---|---|
| Next by Date: | Re: Can't create appender under Redhat Enterprise Server (k 2.4), Curt Arnold |
| Previous by Thread: | Re: No Virtual Destructor for LoggingEvent, Barak Simon |
| Next by Thread: | Can't create appender under Redhat Enterprise Server (k 2.4), brianw1138 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|