SET_WARN_COLOR does not work for me

I’ve never had this work for me. I know my macro works fine in that it prints exactly what I want and how I want it but the text still appears as gray. Is anyone else doing this correctly?

I’m in 4.7.6 and 4.8.0 P4

Here is my macro:

#if _MSC_VER
	#define FUNC_NAME    TEXT(__FUNCTION__)
#else // FIXME - GCC?
	#define FUNC_NAME    TEXT(__func__)
#endif

#define OUR_LOG(Format, ...) \
{ \
    SET_WARN_COLOR( COLOR_CYAN );\
	const FString Msg = FString::Printf(TEXT(Format), ##__VA_ARGS__);\
    UE_LOG(OurCode, Log, TEXT("[%s %s] %s"), *FDateTime::Now().ToString(), FUNC_NAME, *Msg);\
    CLEAR_WARN_COLOR();\
}

I have the same problem. I have even used A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums and still nothing.

I have the same issue in 4.8.2 as well. I get proper logging but the color remains grey.

I have the same problem in 4.13.1.

Is the wiki page (A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums) out of date or has this functionality been broken for a while?

One weird thing I noticed though is that specific built-in editor logs still appear in various unique colors. For example, pressing ESC with nothing selected prints “CMD: SELECT NONE” in the Output Log in dark green. This could potentially indicate that there’s a different way to accomplish the same thing.

Hi everyone,

I did some checking on this since this question comes up from time to time. I wanted to provide you with some information that will hopefully be helpful. First, the SET_WARN_COLOR and CLEAR_WARN_COLOR macros were only intended to be used within the internal Engine source code. They do work, but only when you open your project from the command line with the -log parameter. If you want to try to use these macros in your project, you will be going into uncharted territory since they are not intended to be used there, and we will not be able to provide any support for issues that may arise from using these macros in this way.

Second, we recently added some functionality to the Engine that will allow you to set the various colors in the output log window. Previously these color values were hard-coded based on the severity of the log message, which is why it seemed to be impossible to change those colors. This new functionality provides configurable values that you can set to change the colors. It is currently present in our latest internal version of the Engine, and will be available for you to use in a future release version of the Engine.

Hi . Was this released with 4.15? If so, how can I access this feature? Thank you!

This is available in 4.15. If you go to Editor Preferences -> General -> Appearance -> Output Log, you can change the color settings for the various types of messages that can appear there.

These new settings don’t explicitly allow for selecting the colors of custom log types. For example, I want to make the engine logs be a different color than the logs I specifically added for my project.

Would this be easy to change by adjusting my project’s source code, such as by using the no-longer-functional SET_WARN_COLOR macro as described in A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums ?

Hi mpxc,

It is not intended to be used in this way, but you can use SET_WARN_COLOR in your project if you open the project using the -log parameter. A separate command window will open and the colors that you specified in your log macros will appear here.

If you want the colors to appear in the Output Log window in the Editor, this won’t work. Unfortunately there is a lot of work involved in adding custom colors for this window, including modifying multiple source code files.

Thanks for the reply.

As a quality of life thing, it would be nice if there was functionality to set logs with specific tags (or even specific text) to have user-definable colors.

Of course, not super-high priority, but would be a nice feature to have at some point.