You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by selvaganesang <gi...@git.apache.org> on 2017/04/20 05:10:41 UTC
[GitHub] incubator-trafodion pull request #1070: [TRAFODION-2596] Improve the log4j a...
GitHub user selvaganesang opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1070
[TRAFODION-2596] Improve the log4j and log4cxx infrastructure in Traf\u2026
\u2026odion
The following changes are made in the way Trafodion logs the messages:
Writes to a log file based on a component or set of components.
C++ part of the code base:
Component Default log file Configuration File
TM tm_<nid>.log log4cxx.trafodion.tm.config
SSCP sscp_<nid>.log log4cxx.trafodion.sscp.config
SSMP ssmp_<nid>.log log4cxx.trafodion.ssmp.config
All SQL processes trafodion.sql_<nid>.log log4cxx.trafodion.sql.config
mxosrvr
sqlci
tdm_arkesp
tdm_arkcmp
tdm_udrserv
Java part of the code base
TM trafodion.dtm.log log4j.dtm.config
SQL trafodion.sql.java.log log4j.sql.config
By default, the log level is set to INFO for most of the cases. When a message
dominates the log file and if doesn't add value in the current level, it will be
changed to the higher level in the hierarchy. This should help to improve the
usefulness of the log file at the default INFO level.
The existence of an environment variable TRAF_MULTIPLE_SQL_LOG_FILE will revert back
to the old way of logging into multiple files. Then, the configuration file
log4cxx.trafodion.masterexe.config will be used.
Currently, RollingFileAppender appender is used for both modes. Different config files
are used to change this appender when the need arises.
log4cxx.trafodion.udr.config and log4cxx.trafodion.lob.config are removed.
log4j.hdfs.config used as the config file for SQL is renamed to log4j.sql.config
Foundation components logging will be revamped later.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/selvaganesang/incubator-trafodion trafodion-2596_3
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1070.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1070
----
commit ed4c93f5d26fbd018f8c3ad54165ad1fbb2477c1
Author: selvaganesang <se...@esgyn.com>
Date: 2017-04-20T00:50:56Z
[TRAFODION-2596] Improve the log4j and log4cxx infrastructure in Trafodion
The following changes are made in the way Trafodion logs the messages:
Writes to a log file based on a component or set of components.
C++ part of the code base:
Component Default log file Configuration File
TM tm_<nid>.log log4cxx.trafodion.tm.config
SSCP sscp_<nid>.log log4cxx.trafodion.sscp.config
SSMP ssmp_<nid>.log log4cxx.trafodion.ssmp.config
All SQL processes trafodion.sql_<nid>.log log4cxx.trafodion.sql.config
mxosrvr
sqlci
tdm_arkesp
tdm_arkcmp
tdm_udrserv
Java part of the code base
TM trafodion.dtm.log log4j.dtm.config
SQL trafodion.sql.java.log log4j.sql.config
By default, the log level is set to INFO for most of the cases. When a message
dominates the log file and if doesn't add value in the current level, it will be
changed to the higher level in the hierarchy. This should help to improve the
usefulness of the log file at the default INFO level.
The existence of an environment variable TRAF_MULTIPLE_SQL_LOG_FILE will revert back
to the old way of logging into multiple files. Then, the configuration file
log4cxx.trafodion.masterexe.config will be used.
Currently, RollingFileAppender appender is used for both modes. Different config files
are used to change this appender when the need arises.
log4cxx.trafodion.udr.config and log4cxx.trafodion.lob.config are removed.
log4j.hdfs.config used as the config file for SQL is renamed to log4j.sql.config
Foundation components logging will be revamped later.
----
---
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.
---
[GitHub] incubator-trafodion pull request #1070: [TRAFODION-2596] Improve the log4j a...
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1070#discussion_r112582882
--- Diff: core/conn/odbc/src/odbc/nsksrvr/SrvrMain.cpp ---
@@ -246,8 +246,20 @@ catch(SB_Fatal_Excep sbfe)
myProcName = proc_info.process_name;
char logNameSuffix[32];
- sprintf( logNameSuffix, "_%d_%d.log", myNid, myPid );
- CommonLogger::instance().initLog4cxx("log4cxx.trafodion.masterexe.config", logNameSuffix);
+ const char *lv_configFileName = "log4cxx.trafodion.sql.config";
--- End diff --
Thanks for keeping the old behavior as an option. That will make debugging easier when one wishes to attend to just one process.
---
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.
---
[GitHub] incubator-trafodion pull request #1070: [TRAFODION-2596] Improve the log4j a...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/1070
---
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.
---