Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Re-organize The Sja Output Log File

forums forums SQLyog Sync tools, Migration, Scheduled Backup and Notifications Re-organize The Sja Output Log File

  • This topic is empty.
Viewing 5 reply threads
  • Author
    Posts
    • #9879
      MuphoOx
      Member

      Hi 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();


    • #22432
      MuphoOx
      Member

      If there is any question don't hesitate … 🙄

    • #22433
      peterlaursen
      Participant

      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.

    • #22434
      TomBez
      Member
      peterlaursen 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)

    • #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.


      @Peter

      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 🙁

    • #22436
      TomBez
      Member
      MuphoOx wrote on Sep 18 2006, 10:36 AM:
      @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.


      @Peter

      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.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.