[
https://issues.apache.org/jira/browse/TRAFODION-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071867#comment-16071867
]
ASF GitHub Bot commented on TRAFODION-2676:
-------------------------------------------
GitHub user kevinxu021 opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1160
[TRAFODION-2676]remove log redirection lines
When the user is using T2, the lines of the log before getConnection will
be printed on console, while after getConnection the lines redirected into
trafodion.sql.java.log. In another word, the caller should take responsibility
of the direction of logs in stead of redirecting by default. Usually, it's on
console by default, or the caller will specify the log file themselves( here
the logs in HBaseClient.java even could be printing out) .
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kevinxu021/incubator-trafodion logr
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1160.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 #1160
----
commit 9d11157fcb9650766f7473a95fe8282b0eba485a
Author: Kevin Xu <[email protected]>
Date: 2017-07-03T02:45:09Z
remove log redirection lines
----
> JDBC T2Sample.java test program does not have log after making connection
> -------------------------------------------------------------------------
>
> Key: TRAFODION-2676
> URL: https://issues.apache.org/jira/browse/TRAFODION-2676
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-jdbc-t2
> Reporter: Kevin Xu
>
> T2Sample.java coded to load driver class and make a connection,
> printing msg after each successful step.
> Pgm ends without notice when attempting .getConnection(url)
> (This is one of our regression test programs?) source included here for your
> convenience.
> import java.sql.*;
> import java.math.BigDecimal;
> public class T2Sample
> {
> public static void main(String args[])
> {
> Connection connection;
> Statement stmt;
> PreparedStatement pStmt;
> ResultSet rs;
> DatabaseMetaData dbMeta;
> int rowNo;
> try
> {
> Class.forName("org.apache.trafodion.jdbc.t2.T2Driver");
> System.out.println("Class loaded");
> }
> catch (Exception e)
> {
> e.printStackTrace();
> System.out.println(e.getMessage());
> return;
> }
> try
> {
> //String url = "jdbc:default:connection";
> String url = "jdbc:t2jdbc:";
> System.out.println("Opening connection...");
> connection = DriverManager.getConnection(url);
> System.out.println("Successfully connected");
> }
> catch (Exception e)
> {
> e.printStackTrace();
> System.out.println(e.getMessage());
> return;
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)