Errors, warnings and info are all logged the same in a json format in the Unity console. This makes it difficult to find errors if you are not expecting them. Another thing that bothers me a bit is that some data that comes from the CLI in json format, we print it out each line as a different log in the console, which spams a lot of stuff if you have SPEW_CLI turned on.
I would:
Change the logs from the CLI to not respect the SPEW_CLI condition if errors are happening, mainly because things are not going to break due to the failing happening in a web request. All is going to look normal, but things are actually broken;
I'm not sure if we still have the start and end messages for the CLI commands, but we could use that to tell when a message is not fully ready to be logged. so we can just log all the data or the json in one single entry;
Put some colors on error/warning logs
Find a more "readable" log line in case we want to show these logs to customers as well? Instead of just printing json
This is how a log looks like from the CLI in Unity console:
(the one highlighted is an error)
scan the json, and detect an error, and if it is an error, use Debug.LogError to log the message field. (and ignore spew settings)
the regular verbose logging is still find to leave as the raw json payload. Question-whilst-we-look, could we clean up the regular JSON, maybe we don't need the ts and the type field?
Errors, warnings and info are all logged the same in a json format in the Unity console. This makes it difficult to find errors if you are not expecting them. Another thing that bothers me a bit is that some data that comes from the CLI in json format, we print it out each line as a different log in the console, which spams a lot of stuff if you have SPEW_CLI turned on.
I would:
This is how a log looks like from the CLI in Unity console: (the one highlighted is an error)