LogManager should offer a method to decompose "log headers" created by 
getHeader()
----------------------------------------------------------------------------------

                 Key: DS-1087
                 URL: https://jira.duraspace.org/browse/DS-1087
             Project: DSpace
          Issue Type: New Feature
          Components: DSpace API
            Reporter: Mark H. Wood
         Attachments: LogManager.patch

LogManager.getHeader creates a structured log message header which is clearly 
meant to be machine-readable.  However, there is no corresponding method for 
recovering the component data from such a header.  Coders wishing to read log 
messages back in must know intimate details of how getHeader works and hope 
that it doesn't change.  The principle of separation of concerns suggests that 
LogManager should keep this knowledge local by providing a decomposer for the 
serialized structures which it composes.  See attached patch for an attempt at 
adding this.

Note that this is only part of the problem.  The logging package(s) used by 
DSpace are typically configured to prepend a timestamp, severity, source 
classname, and other stuff when rendering messages.  Such configuration is 
outside of DSpace, so that part of cracking a log message properly belongs to 
the logging package.  At best, we might define a configurable regular 
expression to match the logging package's configured prefix, and perhaps 
provide a stock method to employ that expression for extracting a log line's 
components.  It would be up to the site to ensure that the regex is kept in 
sync. with any changes to the configuration of log appenders.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to