As a Roblox developer, it is currently impossible to print to the console with a color that indicates status/severity other than the yellow/orange from warn(), and even with that…
As a Roblox developer, it is currently impossible to print console warnings that distinguish developer-code warnings and errors from Roblox code warnings (like the infinite yield warnings). I often care about only one or the other when debugging a specific feature.
I like the Error / Warn / Info filtering in the console, but while developing I’ve often found myself wanting to be able to output things in additional colors, most especially:
Bright green output messages for “everything’s fine”, aka OK status messages for at-a-glance evaluation of things like server startup conditions.
Ability to use Red or another bold color to indicate a serious warning without having to throw via error()
In the most general form, this could be a new variant of print() that has a Color3 parameter. A more sophisticated version might let the developer supply not only a color, but a string key for the message type/severity which could be registered with corescripts and added to the list of filtering checkboxes under Client and Server logs.
Being able to color-code print messages would be pretty helpful.
To get around it myself, I just made a custom function that formats it differently and hides certain debug messages if the debugging level isn’t set high enough to display them. ( Something like a function starting won’t show unless I set it to show all debug messages. )
Formats like
[ system name ] [ debug severity ] [ script name ] (message here)
Alternates between warn()/print() depending on how high the severity is.
That’s of course the longer way to go around it, though.
This is something that’s been on my mind for a while. I sometimes like to get spammy with prints and warnings just so I can find my answers faster. It would be pretty nice to color-code that one cframe variable that gets printed on Heartbeat and color code it based on its correctness.
We have internal feature requests too, but this particular feature would be primarily for developers, not so much for Roblox engineers apart from those of us who work on CoreScripts and PlayerScripts, and we’re outnumbered by devs by a few orders of magnitude. So, it’s most useful to know if (and how) the development community would use this, and what others’ needs are in this area. Think of this as more of an RFC (request for comment) than a request being made to Roblox.
I too would like to print in red for error information without having the script actually stop.
Most of the time I have been using warn for errors but having it say [Error]: to make it clear thats its not a usual warning.
Also having a way to use green for things like saying everything is good, would also help. so it doesn’t get lost in the white messages that usually gets printed for informational stuff.
Specifying keys instead of colors is more useful. I’d like to be able to do something like:
log("Debug", "The script has started running")
and then disable debug output for finished scripts, but retain it for in-progress code. No more:
local DEBUG_ENABLED = false
local oldPrint = print
function print(...)
if not DEBUG_ENABLED then return end
oldPrint(...)
end
print("The script has started running")
I typically print a lot of information under normal conditions, so when something different or urgent is printed, it’s extremely difficult for me to pick it out of the output ocean unless I use warn(), which can also quickly become over-saturated. I would love to be able to categorize my messages in a more granular way.
Additional colors in the output log would be extremely useful for quickly identifying patterns or spotting certain messages, and being able to filter messages by programmer-defined keys would also be very powerful (you wouldn’t need to rely on message color to find messages of a certain type). However, since the context of a message may be important (an important message may be surrounded by relevant information messages), both of these features would be fantastic to have.
The way I inherently see the platform feedback section (excluding engineering feedback) is that it’s Roblox developers giving features to Roblox engineers. I don’t see why you can’t do that, I just find that it’s an odd thing but I do welcome if more try. Just something odd to me.
Ah, some of us are both though [insert multiple-inheritance joke here] I was at home on a holiday, making a Roblox game with my daughter when I had this idea, and I would not be the engineer to implement this feature, so your criterion is met!
TestService:Message() is currently (from what i know) the only way to print out blue messages
however, it also loves to print out TestService: before the actual message
would LOVE to see an alternative to that clunky thing
Absolutely support this idea.
I’ve done a bit of robotics and electricity in my life and it made me realize how important color coding and all that really is.
It would be SUPER nice to have a new print function that can both print in color and be sorted and filtered.
Ideally, I would also want the print functions to be a bit more optimized.
Currently if you use a lot of prints in your code it also seems to slow down scripts by a tiny fraction.
I’ve had cases where I had to run big for loops or iterative code and using print functions seemed to slow it down a lot for some reason.
Normally commenting out the print solves that but I’d like not having to comment any prints and just have a “debug mode” switch instead.