Trouble viewing server logs

Discussion in 'Bukkit Help' started by xbenas, May 1, 2014.

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

    xbenas

    Hey, I need some help with server logs.
    In the console, everything is OK, I see this:


    Code:
    [21:05:00 INFO]: <block308> :D
    However, when I take a look at the same thing in my log file, I see this:
    Code:
    [21:05:00] [Server thread/INFO]: <block308> :D
    How I actually see it using Notepad++:
    Clipboard02.png



    Is there a special log viewer program that will help me avoid this hassle? Thanks.
     
  2. Offline

    Bobcat00

    Those are escape sequences for colors. You can get rid of them with a log4j configuration file. You need to add:
    Code:
    <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%level] %replace{%msg}{\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?[m|K]}{}%n" />
    
    to the logging for the file (not the console). You can also add a lot more functionality. For more info, see these two links:
    http://evilseph.com/post/69715062422/taming-minecraft-servers-log4j2-basics
    http://forums.bukkit.org/threads/log-file-format-log4j2.209002/
     
  3. Offline

    MrZenek

    It's the fault code. You open the file in a different encoding than is saved. Try to open as UTF-8 or something like that
     
  4. Offline

    xbenas

    Bobcat00 Thanks, I am going to try that tomorrow.
     
  5. Offline

    Bobcat00

    Evilseph posted the default Bukkit log4j file, so you can use that as a baseline if you like the new Bukkit logging system with multiple compressed files. If you like the old system with consolidated logs, you can either modify the other file Evilseph posted, or you can use my file which has 10 log files of 500 kB each.
     
Thread Status:
Not open for further replies.

Share This Page