Problem/Bug Console cutting output

Discussion in 'General Help' started by sebcio98, Sep 25, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    sebcio98

    Hello,
    I have a problem with not seeing the full output after dumping a whole lot of lines into the console. It is for debug purpouses, thusly I cannot have Bukkit skip any lines, while it is exactly what it does. It shows only the first few lines and then the last few lines from a 320-line expected output.
    I'm assuming it is either a Bukkit functionality to decrease lag ot Java running out of output buffer.. or something? The "System.out.flush()" should empty the buffer into console, that's why I'm leaning more towards it being a Bukkit prolem. Is there any way to disable that and see the full output?

    version: 1.12.2-R0.1

    code:
    Code:
    for (long p=0L; p<320; ++p) {
      int slot = (int) (p%5); // not revellant
      long pp = p/5;         // not revellant
      int x = (int) (pp%8);  // not revellant
      pp = pp/8;             // not revellant
      int z = (int) (pp%8);  // not revellant
      int y = (int) (pp/8);  // not revellant
    
      System.out.println(p + ": " + x + " " + y + " " + z + ", " + slot);
      System.out.flush();
    }
    ouput:
    >click< (open)

    Code:
    [17:08:48 INFO]: 0: 0 0 0, 0
    [17:08:48 INFO]: 1: 0 0 0, 1
    [17:08:48 INFO]: 2: 0 0 0, 2
    [17:08:48 INFO]: 3: 0 0 0, 3
    [17:08:48 INFO]: 4: 0 0 0, 4
    [17:08:48 INFO]: 5: 1 0 0, 0
    [17:08:48 INFO]: 6: 1 0 0, 1
    [17:08:48 INFO]: 7: 1 0 0, 2
    [17:08:48 INFO]: 8: 1 0 0, 3
    [17:08:48 INFO]: 9: 1 0 0, 4
    [17:08:48 INFO]: 10: 2 0 0, 0
    [17:08:48 INFO]: 11: 2 0 0, 1
    [17:08:48 INFO]: 12: 2 0 0, 2
    [17:08:48 INFO]: 13: 2 0 0, 3
    [17:08:48 INFO]: 14: 2 0 0, 4
    [17:08:48 INFO]: 265: 5 0 6, 0
    [17:08:48 INFO]: 266: 5 0 6, 1
    [17:08:48 INFO]: 267: 5 0 6, 2
    [17:08:48 INFO]: 268: 5 0 6, 3
    [17:08:48 INFO]: 269: 5 0 6, 4
    [17:08:48 INFO]: 270: 6 0 6, 0
    [17:08:48 INFO]: 271: 6 0 6, 1
    [17:08:48 INFO]: 272: 6 0 6, 2
    [17:08:48 INFO]: 273: 6 0 6, 3
    [17:08:48 INFO]: 274: 6 0 6, 4
    [17:08:48 INFO]: 275: 7 0 6, 0
    [17:08:48 INFO]: 276: 7 0 6, 1
    [17:08:48 INFO]: 277: 7 0 6, 2
    [17:08:48 INFO]: 278: 7 0 6, 3
    [17:08:48 INFO]: 279: 7 0 6, 4
    [17:08:48 INFO]: 280: 0 0 7, 0
    [17:08:48 INFO]: 281: 0 0 7, 1
    [17:08:48 INFO]: 282: 0 0 7, 2
    [17:08:48 INFO]: 283: 0 0 7, 3
    [17:08:48 INFO]: 284: 0 0 7, 4
    [17:08:48 INFO]: 285: 1 0 7, 0
    [17:08:48 INFO]: 286: 1 0 7, 1
    [17:08:48 INFO]: 287: 1 0 7, 2
    [17:08:48 INFO]: 288: 1 0 7, 3
    [17:08:48 INFO]: 289: 1 0 7, 4
    [17:08:48 INFO]: 290: 2 0 7, 0
    [17:08:48 INFO]: 291: 2 0 7, 1
    [17:08:48 INFO]: 292: 2 0 7, 2
    [17:08:48 INFO]: 293: 2 0 7, 3
    [17:08:48 INFO]: 294: 2 0 7, 4
    [17:08:48 INFO]: 295: 3 0 7, 0
    [17:08:48 INFO]: 296: 3 0 7, 1
    [17:08:48 INFO]: 297: 3 0 7, 2
    [17:08:48 INFO]: 298: 3 0 7, 3
    [17:08:48 INFO]: 299: 3 0 7, 4
    [17:08:48 INFO]: 300: 4 0 7, 0
    [17:08:48 INFO]: 301: 4 0 7, 1
    [17:08:48 INFO]: 302: 4 0 7, 2
    [17:08:48 INFO]: 303: 4 0 7, 3
    [17:08:48 INFO]: 304: 4 0 7, 4
    [17:08:48 INFO]: 305: 5 0 7, 0
    [17:08:48 INFO]: 306: 5 0 7, 1
    [17:08:48 INFO]: 307: 5 0 7, 2
    [17:08:48 INFO]: 308: 5 0 7, 3
    [17:08:48 INFO]: 309: 5 0 7, 4
    [17:08:48 INFO]: 310: 6 0 7, 0
    [17:08:48 INFO]: 311: 6 0 7, 1
    [17:08:48 INFO]: 312: 6 0 7, 2
    [17:08:48 INFO]: 313: 6 0 7, 3
    [17:08:48 INFO]: 314: 6 0 7, 4
    [17:08:48 INFO]: 315: 7 0 7, 0
    [17:08:48 INFO]: 316: 7 0 7, 1
    [17:08:48 INFO]: 317: 7 0 7, 2
    [17:08:48 INFO]: 318: 7 0 7, 3
    [17:08:48 INFO]: 319: 7 0 7, 4
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    sebcio98

    @timtower I have added it only to exclude the possibility of it being Java's output buffer overflowing. Code works exactly the same without it.
     
  4. Online

    timtower Administrator Administrator Moderator

    @sebcio98 You can also write to a fike if it is for debugging
     
  5. Offline

    sebcio98

    @timtower True, that's a good alternate solution. But I would like to find a direct solution to this problem. Mostly because it's easier to debug through console with my setup, at least up to a few hundred lines, and also because I want to understand what exactly cuts those lines out and how I can affect that system.
     
  6. Online

    timtower Administrator Administrator Moderator

    @sebcio98 And if you use the bukkit logger?
     
  7. Offline

    sebcio98

    @timtower I've been using different methods of printing stuff on screen, including Bukkit logger, all have the same output.
     
Thread Status:
Not open for further replies.

Share This Page