Solved Colors in log.

Discussion in 'Plugin Development' started by German121314, Aug 7, 2013.

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

    German121314

    What code i should use to add colors to logger?

    Code:java
    1. log.info("TEXTMUSTHAVECOLOR")
     
  2. Offline

    TomFromCollege

    I think that mainly depends on the console you're outputting to, I know that putty supports the standard minecraft color codes with the "Squiggly S" (I'm not on my PC, so I can't rightly give you any code)
     
  3. Offline

    lycano

    German121314 you should not use color codes in console as the log file will show the color codes where the logging output will display the color.

    You can however use ChatColor interface and use translateAlternateColorCodes if needed as color codes might be interpreted differently by consoles. (OS dependend) Which is another argument for not using color codes.
     
  4. Offline

    German121314

    So it is'nt possible?

    Code:java
    1. Bukkit.getServer().broadcastMessage(ChatColor.GREEN+"But this will!");



    solved

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
Thread Status:
Not open for further replies.

Share This Page