trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertamarton <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-353][TRAFODION-1200][...
Date Mon, 31 Aug 2015 16:36:20 GMT
Github user robertamarton commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/69#discussion_r38330547
  
    --- Diff: core/sql/sqlcomp/PrivMgr.cpp ---
    @@ -894,3 +918,49 @@ void PrivMgr::setFlags()
       SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
     }
     
    +// ----------------------------------------------------------------------------
    +// method::log
    +//
    +// sends a message to log4cxx implementation designed by SQL
    +//
    +// Input:
    +//    filename - code file that is performing the request 
    +//    message  - the message to log
    +//    index    - index for logging that loops through a list
    +//
    +// Background
    +//   Privilege manager code sets up a message and calls this log method
    +//   This method calls SQLMXLoggingArea::logPrivMgrInfo described in 
    +//      sqlmxevents/logmxevent_traf (.h & .cpp)
    +//   logPrivMgInfo is a wrapper class around qmscommon/QRLogger (.h & .cpp)
    +//      log method
    +//   QRLogger generates a message calls the log method in 
    +//      sqf/commonLogger/CommonLogger (.h & .cpp) 
    +//   CommonLogger interfaces with the log4cxx code which eventually puts
    +//      a message into a log file called ../sqf/logs/master_exec_0_pid.log.  
    +//      A new master log is created for each new SQL process started.
    +//
    +// Sometimes it is amazing that things actually work with all these levels
    +// of interfaces.  Perhaps we can skip a few levels...  
    +// ----------------------------------------------------------------------------
    +void PrivMgr::log(
    +  const std::string filename,
    +  const std::string message,
    +  const int_32 index)
    +{ 
    +  // for now, don't log
    +  return;
    --- End diff --
    
    It is working very well.  But the way it is implemented is to always log messages informational.
 I want to change this to use trace instead.  So, we only log if configured with trace.  I
had not yet gotten this to work so I decided not to set tracing on yet.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message