forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Re-organize The Sja Output Log File
- This topic is empty.
-
AuthorPosts
-
-
September 15, 2006 at 9:39 am #9879
MuphoOx
MemberHi all;
I'm using SJA enbeded on a java software, i've created a new window on my application that interact with the SJA module via batch files.
Actually i'm printing on the screen the log file generated by sja, but it's not as well organized as it is on the cmd window… (i've put a screenshot as an attachment to this post)
Is there any parameter, that i can set to have a well printed result ?
PS: i'm printing the log file from a Buffer, refer to the source code downward,
the function “getQuestionAndAnswer” is a user function used to connect two interface class with parameters,
This code is working well.
Source code called when the button “Synchroniser” is hitted
Process p = Runtime.getRuntime().exec( home_dir[0] + “batch_synchro.bat” );
getQuestionAndAnswer(“show_logs”).setAnswer(null);
BufferedReader in = new BufferedReader (new InputStreamReader(p.getInputStream()));
int compt = 0;
while ((line = in.readLine()) != null) {
if (compt > 3){
String current = (String)getQuestionAndAnswer(“show_logs”).getAnswer();
getQuestionAndAnswer(“show_logs”).setAnswer((current==null?””:current) + line + “n”);
}
compt++;
}
in.close();
-
September 15, 2006 at 11:28 am #22432
MuphoOx
MemberIf there is any question don't hesitate … 🙄
-
September 15, 2006 at 11:57 am #22433
peterlaursen
Participant1) you should use a non-proportional font (like Courier) – it looks like Arial …
.. a series of SPACEs do not take much SPACE for instance …
That will do the trick if column names are not too long.
-
September 18, 2006 at 8:03 am #22434
TomBez
Memberpeterlaursen wrote on Sep 15 2006, 01:57 PM:1) you should use a non-proportional font (like Courier) – it looks like Arial ….. a series of SPACEs do not take much SPACE for instance …
That will do the trick if column names are not too long.
a different solution would be, to put the datacells into a html-table. depends on what gui-framework you use. (split values with regexp)
-
September 18, 2006 at 8:36 am #22435
MuphoOx
Member@TomBez
It would be greate to put html tabs … but i'm reading the file trough a Buffer line by line, i don't know how i could split the array in colums.
I've tried the non-proportional font => Courier, but in vain .. nothing has changed ! exactlu the same result. And what makes me 😡 is that the same command, called directly from CMD window is well organised 🙁
-
September 18, 2006 at 11:37 am #22436
TomBez
MemberMuphoOx wrote on Sep 18 2006, 10:36 AM:@TomBezIt would be greate to put html tabs … but i'm reading the file trough a Buffer line by line, i don't know how i could split the array in colums.
I've tried the non-proportional font => Courier, but in vain .. nothing has changed ! exactlu the same result. And what makes me 😡 is that the same command, called directly from CMD window is well organised 🙁
quite easily, split the line
String splittedLine[] = line.split(” “);
you have than analyse the array and only take the arrayfields where there is a value in it and you should than have everything in an array.
-
-
AuthorPosts
- You must be logged in to reply to this topic.