[jira] [Commented] (DIRKRB-523) Avoid outputting data to System.out in Asn1 + Asn1Dumper

2016-01-17 Thread Kai Zheng (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRKRB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15103965#comment-15103965
 ] 

Kai Zheng commented on DIRKRB-523:
--

I just made a change avoiding dumping data in tests, and the parsed/decoded 
results will still be dumped. This is because currently we're still relying on 
the the output to roughly check if the parser and decoder are running fine or 
not, since most of our tests are not completely checking and comparing the 
decoded results. Will leave this open until we're done totally in future.

> Avoid outputting data to System.out in Asn1 + Asn1Dumper
> 
>
> Key: DIRKRB-523
> URL: https://issues.apache.org/jira/browse/DIRKRB-523
> Project: Directory Kerberos
>  Issue Type: Bug
>Reporter: Colm O hEigeartaigh
>
> I notice a lot of text output in the Kerby tests along the lines of:
> Dumping data:
> >60818561101A044A6F686E1A01501A05536D697468A00A1A084469726563746F72420133A10A43083139373130393137A212
> 61101A044D6172791A01541A05536D697468A342311F6A0552616C70681A01541A05536D697468A00A43083139353731
> 313131311F6A05537573616E1A01421A054A6F6E6573A00A43083139353930373137
> application [0] [tag=0x60, off=0, len=3+133]
> etc.
>  
> Both the Asn1 + Asn1Dumper classes are outputting data using 
> System.out.println(). I don't think this is a good idea, that classes in
> src/main/java are outputting data to system.out. Is there a reason for
> this? Surely if anything, the Asn1Dumper could output to a log instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DIRKRB-523) Avoid outputting data to System.out in Asn1 + Asn1Dumper

2016-01-07 Thread Kai Zheng (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRKRB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15087262#comment-15087262
 ] 

Kai Zheng commented on DIRKRB-523:
--

In my understanding, {{log}} is to log something that's seldom the formal 
output in a process. It's just in case you need it. However, {{dump}} is an 
intended call that's wanted to be out right before his hand. If you'd like to 
check out other similar dumper tools, they often dump to the user console. It's 
simple, if you don't want it, then don't call it.

It's different from something like in Kerby KdcServer side, we need to log the 
message out to the server logs, where the dumper will be equipped with a new 
method to get the content out and then the content can be output to logs when 
meets with some errors for troubleshooting. 

> Avoid outputting data to System.out in Asn1 + Asn1Dumper
> 
>
> Key: DIRKRB-523
> URL: https://issues.apache.org/jira/browse/DIRKRB-523
> Project: Directory Kerberos
>  Issue Type: Bug
>Reporter: Colm O hEigeartaigh
>
> I notice a lot of text output in the Kerby tests along the lines of:
> Dumping data:
> >60818561101A044A6F686E1A01501A05536D697468A00A1A084469726563746F72420133A10A43083139373130393137A212
> 61101A044D6172791A01541A05536D697468A342311F6A0552616C70681A01541A05536D697468A00A43083139353731
> 313131311F6A05537573616E1A01421A054A6F6E6573A00A43083139353930373137
> application [0] [tag=0x60, off=0, len=3+133]
> etc.
>  
> Both the Asn1 + Asn1Dumper classes are outputting data using 
> System.out.println(). I don't think this is a good idea, that classes in
> src/main/java are outputting data to system.out. Is there a reason for
> this? Surely if anything, the Asn1Dumper could output to a log instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DIRKRB-523) Avoid outputting data to System.out in Asn1 + Asn1Dumper

2016-01-07 Thread Colm O hEigeartaigh (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRKRB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15087232#comment-15087232
 ] 

Colm O hEigeartaigh commented on DIRKRB-523:


Why not just output to a Log instead, and let the user decide where to direct 
the log output to?

Colm.

> Avoid outputting data to System.out in Asn1 + Asn1Dumper
> 
>
> Key: DIRKRB-523
> URL: https://issues.apache.org/jira/browse/DIRKRB-523
> Project: Directory Kerberos
>  Issue Type: Bug
>Reporter: Colm O hEigeartaigh
>
> I notice a lot of text output in the Kerby tests along the lines of:
> Dumping data:
> >60818561101A044A6F686E1A01501A05536D697468A00A1A084469726563746F72420133A10A43083139373130393137A212
> 61101A044D6172791A01541A05536D697468A342311F6A0552616C70681A01541A05536D697468A00A43083139353731
> 313131311F6A05537573616E1A01421A054A6F6E6573A00A43083139353930373137
> application [0] [tag=0x60, off=0, len=3+133]
> etc.
>  
> Both the Asn1 + Asn1Dumper classes are outputting data using 
> System.out.println(). I don't think this is a good idea, that classes in
> src/main/java are outputting data to system.out. Is there a reason for
> this? Surely if anything, the Asn1Dumper could output to a log instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (DIRKRB-523) Avoid outputting data to System.out in Asn1 + Asn1Dumper

2016-01-07 Thread Kai Zheng (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRKRB-523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15087360#comment-15087360
 ] 

Kai Zheng commented on DIRKRB-523:
--

Yes as discussed above we'll have new method(s) like {{dumpAsString}} or the 
like to return the dumped content for the callers to proceed. The current 
methods that dump to console are mainly for our own's sake, it's so convenient 
if you want to inspect any bits stream, Asn1 object, then dump it and it's 
there, in the IDE, or command line. We at least make ourselves happy because 
debugging is so hard. :)


> Avoid outputting data to System.out in Asn1 + Asn1Dumper
> 
>
> Key: DIRKRB-523
> URL: https://issues.apache.org/jira/browse/DIRKRB-523
> Project: Directory Kerberos
>  Issue Type: Bug
>Reporter: Colm O hEigeartaigh
>
> I notice a lot of text output in the Kerby tests along the lines of:
> Dumping data:
> >60818561101A044A6F686E1A01501A05536D697468A00A1A084469726563746F72420133A10A43083139373130393137A212
> 61101A044D6172791A01541A05536D697468A342311F6A0552616C70681A01541A05536D697468A00A43083139353731
> 313131311F6A05537573616E1A01421A054A6F6E6573A00A43083139353930373137
> application [0] [tag=0x60, off=0, len=3+133]
> etc.
>  
> Both the Asn1 + Asn1Dumper classes are outputting data using 
> System.out.println(). I don't think this is a good idea, that classes in
> src/main/java are outputting data to system.out. Is there a reason for
> this? Surely if anything, the Asn1Dumper could output to a log instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)