You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Currently, invalid characters in logs are not properly formatted and therefore results in malformed log lines. We need to investigate on the invalid characters in the supported formats and escape them accordingly.
Found the following characters that cause the log lines to be malformed
\n
"
Steps to reproduce:
Use the following code
importballerina/log;
publicfunction main() {
log:printError("Request received from user \"nadun\"");
log:printError("New line test \n test log end");
}
JSON Log Output:
{"time": "2021-03-31 14:11:09,906", "level": "ERROR", "module": "nadun/test_logs", "message": "Request received from user "nadun""}
{"time": "2021-03-31 14:11:09,931", "level": "ERROR", "module": "nadun/test_logs", "message": "New line test
test log end"}
Normal Log Output:
time = 2021-03-31 14:12:12,890 level = ERROR module = nadun/test_logs message = "Request received from user "nadun""
time = 2021-03-31 14:12:12,909 level = ERROR module = nadun/test_logs message = "New line test
test log end
Affected Versions:
Ballerina Swan Lake Alpha 4
The text was updated successfully, but these errors were encountered:
Description:
Currently, invalid characters in logs are not properly formatted and therefore results in malformed log lines. We need to investigate on the invalid characters in the supported formats and escape them accordingly.
Found the following characters that cause the log lines to be malformed
\n
"
Steps to reproduce:
Use the following code
JSON Log Output:
Normal Log Output:
Affected Versions:
Ballerina Swan Lake Alpha 4
The text was updated successfully, but these errors were encountered: