Skip to content

Commit

Permalink
Merge pull request #4871 from daneshk/master
Browse files Browse the repository at this point in the history
Change the log output messages with update 08
  • Loading branch information
daneshk authored Sep 8, 2023
2 parents d0de77e + 7251197 commit 09b46a2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
20 changes: 10 additions & 10 deletions examples/logging-configuration/logging_configuration.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ bal run logging_configuration.bal
time = 2021-05-25T11:06:54.998+05:30 level = ERROR module = "" message = "error log"
time = 2021-05-25T11:06:55.009+05:30 level = INFO module = "" message = "info log"
time = 2021-05-25T11:06:55.010+05:30 level = WARN module = "" message = "warn log"
time=2023-09-04T13:39:47.027+05:30 level=ERROR module="" message="error log"
time=2023-09-04T13:39:47.037+05:30 level=INFO module="" message="info log"
time=2023-09-04T13:39:47.038+05:30 level=WARN module="" message="warn log"
# As shown in the output, only the `INFO` and higher level logs are logged by default.

# The log level can be configured via a Ballerina configuration file.
Expand All @@ -10,10 +10,10 @@ time = 2021-05-25T11:06:55.010+05:30 level = WARN module = "" message = "warn lo
# [ballerina.log]
# level = "DEBUG"
# ```
time = 2021-05-25T11:11:24.898+05:30 level = DEBUG module = "" message = "debug log"
time = 2021-05-25T11:11:24.914+05:30 level = ERROR module = "" message = "error log"
time = 2021-05-25T11:11:24.915+05:30 level = INFO module = "" message = "info log"
time = 2021-05-25T11:11:24.915+05:30 level = WARN module = "" message = "warn log"
time=2023-09-04T13:42:07.797+05:30 level=DEBUG module="" message="debug log"
time=2023-09-04T13:42:07.807+05:30 level=ERROR module="" message="error log"
time=2023-09-04T13:42:07.808+05:30 level=INFO module="" message="info log"
time=2023-09-04T13:42:07.809+05:30 level=WARN module="" message="warn log"
# As shown in the output, now the `DEBUG` and higher level logs are logged.

# Each module can also be assigned its own log level. To assign a
Expand All @@ -31,6 +31,6 @@ time = 2021-05-25T11:11:24.915+05:30 level = WARN module = "" message = "warn lo
# [ballerina.log]
# format = "json"
# ```
{"time":"2021-05-25T11:14:43.986+05:30", "level":"ERROR", "module":"", "message":"error log"}
{"time":"2021-05-25T11:14:44.005+05:30", "level":"INFO", "module":"", "message":"info log"}
{"time":"2021-05-25T11:14:44.006+05:30", "level":"WARN", "module":"", "message":"warn log"}
{"time":"2023-09-04T13:44:10.529+05:30", "level":"ERROR", "module":"", "message":"error log"}
{"time":"2023-09-04T13:44:10.536+05:30", "level":"INFO", "module":"", "message":"info log"}
{"time":"2023-09-04T13:44:10.536+05:30", "level":"WARN", "module":"", "message":"warn log"}
4 changes: 2 additions & 2 deletions examples/logging-with-context/logging_with_context.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$ bal run logging_with_context.bal
time = 2021-05-25T10:34:25.460+05:30 level = INFO module = "" message = "info log" current_time = "2021-05-25T05:04:25.473981Z"
time = 2021-05-25T10:34:25.487+05:30 level = INFO module = "" message = "info log" percentage = 38.4141353500368
time=2023-09-04T13:38:09.181+05:30 level=INFO module="" message="info log" current_time="2023-09-04T08:08:09.184211Z"
time=2023-09-04T13:38:09.194+05:30 level=INFO module="" message="info log" percentage=15.125095844268799
11 changes: 5 additions & 6 deletions examples/logging/logging.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
$ bal run logging.bal
time = 2021-05-25T11:29:58.290+05:30 level = DEBUG module = "" message = "debug log"
time = 2021-05-25T11:29:58.305+05:30 level = ERROR module = "" message = "error log"
time = 2021-05-25T11:29:58.306+05:30 level = INFO module = "" message = "info log"
time = 2021-05-25T11:29:58.307+05:30 level = WARN module = "" message = "warn log"
time = 2021-05-25T11:29:58.307+05:30 level = INFO module = "" message = "info log" name = "foo" id = 845315 successful = true
time = 2021-05-25T11:29:58.317+05:30 level = ERROR module = "" message = "error log with cause" error = "something went wrong!" name = "foo" id = 845315
time=2023-09-04T13:35:12.309+05:30 level=ERROR module="" message="error log"
time=2023-09-04T13:35:12.319+05:30 level=INFO module="" message="info log"
time=2023-09-04T13:35:12.320+05:30 level=WARN module="" message="warn log"
time=2023-09-04T13:35:12.321+05:30 level=INFO module="" message="info log" id=845315 name="foo" successful=true
time=2023-09-04T13:35:12.323+05:30 level=ERROR module="" message="error log with cause" error={"causes":[],"message":"something went wrong!","detail":{},"stackTrace":[{"callableName":"main","moduleName":(),"fileName":"logging.bal","lineNumber":15}]} id=845315 name="foo"

0 comments on commit 09b46a2

Please sign in to comment.