You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Isuru Perera <is...@wso2.com> on 2013/12/18 17:46:57 UTC
Fwd: git commit: Add debug logs to CLI
When I started work on CLI few months back, I added proper loggers and all
logs were written to a log file in home directory. What happened to those?
Do not use printStackTrace method
---------- Forwarded message ----------
From: <ma...@apache.org>
Date: Wed, Dec 18, 2013 at 8:10 AM
Subject: git commit: Add debug logs to CLI
To: commits@stratos.incubator.apache.org
Updated Branches:
refs/heads/master ede69d5cd -> 240dc91e8
Add debug logs to CLI
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit:
http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/240dc91e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/240dc91e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/240dc91e
Branch: refs/heads/master
Commit: 240dc91e828bd949db45701d84d090cef51a0f35
Parents: ede69d5
Author: Manula Thantriwatte <ma...@apache.org>
Authored: Wed Dec 18 21:40:06 2013 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Wed Dec 18 21:40:06 2013 +0530
----------------------------------------------------------------------
.../org/apache/stratos/cli/RestCommandLineService.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/240dc91e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git
a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 329e315..59bb7ba 100644
---
a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++
b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -376,10 +376,13 @@ public class RestCommandLineService {
return;
}
+ System.out.println("Response code : " + responseCode);
+ System.out.println(completeJsonSubscribeString);
+
String subscription = getHttpResponseString(response);
if (subscription == null) {
- System.out.println("Error in response");
+ System.out.println("Error in response 1");
return;
}
@@ -426,10 +429,13 @@ public class RestCommandLineService {
return;
}
+ System.out.println("Response code : " + responseCode);
+ System.out.println(completeJsonSubscribeString);
+
String subscriptionOutput = getHttpResponseString(response);
if (subscriptionOutput == null) {
- System.out.println("Error in response");
+ System.out.println("Error in response 2");
return;
}
@@ -888,6 +894,7 @@ public class RestCommandLineService {
}
return result;
} catch (SocketException e) {
+ e.printStackTrace();
System.out.println("Connection problem");
return null;
} catch (NullPointerException e) {
--
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware
about.me/chrishantha
Re: git commit: Add debug logs to CLI
Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Isuru,
This is only for the testing purpose. I'll remove them.
Thanks !
On Wed, Dec 18, 2013 at 10:16 PM, Isuru Perera <is...@wso2.com> wrote:
> When I started work on CLI few months back, I added proper loggers and all
> logs were written to a log file in home directory. What happened to those?
>
> Do not use printStackTrace method
>
> ---------- Forwarded message ----------
> From: <ma...@apache.org>
> Date: Wed, Dec 18, 2013 at 8:10 AM
> Subject: git commit: Add debug logs to CLI
> To: commits@stratos.incubator.apache.org
>
>
> Updated Branches:
> refs/heads/master ede69d5cd -> 240dc91e8
>
>
> Add debug logs to CLI
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/240dc91e
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/240dc91e
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/240dc91e
>
> Branch: refs/heads/master
> Commit: 240dc91e828bd949db45701d84d090cef51a0f35
> Parents: ede69d5
> Author: Manula Thantriwatte <ma...@apache.org>
> Authored: Wed Dec 18 21:40:06 2013 +0530
> Committer: Manula Thantriwatte <ma...@apache.org>
> Committed: Wed Dec 18 21:40:06 2013 +0530
>
> ----------------------------------------------------------------------
> .../org/apache/stratos/cli/RestCommandLineService.java | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/240dc91e/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
> ----------------------------------------------------------------------
> diff --git
> a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
> b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
> index 329e315..59bb7ba 100644
> ---
> a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
> +++
> b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
> @@ -376,10 +376,13 @@ public class RestCommandLineService {
> return;
> }
>
> + System.out.println("Response code : " + responseCode);
> + System.out.println(completeJsonSubscribeString);
> +
> String subscription = getHttpResponseString(response);
>
> if (subscription == null) {
> - System.out.println("Error in response");
> + System.out.println("Error in response 1");
> return;
> }
>
> @@ -426,10 +429,13 @@ public class RestCommandLineService {
> return;
> }
>
> + System.out.println("Response code : " + responseCode);
> + System.out.println(completeJsonSubscribeString);
> +
> String subscriptionOutput = getHttpResponseString(response);
>
> if (subscriptionOutput == null) {
> - System.out.println("Error in response");
> + System.out.println("Error in response 2");
> return;
> }
>
> @@ -888,6 +894,7 @@ public class RestCommandLineService {
> }
> return result;
> } catch (SocketException e) {
> + e.printStackTrace();
> System.out.println("Connection problem");
> return null;
> } catch (NullPointerException e) {
>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>
--
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware
email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/