diff --git a/README.md b/README.md index 3eec3ccd8b79ddd502bc4222954e5116a5a6825b..e4a8a766885cc6af4b99db506874a40026d7763d 100644 --- a/README.md +++ b/README.md @@ -142,25 +142,21 @@ Log message formats: - Transaction [id]: Exception [name] --Stacktrace-- -```bash - -1|2020-09-15T11:01:20.380Z|INFO|MainThread|__enter__|transactions.py#46||Transaction [txn-T0001-20200914-00005]: Enter [Command] with parameters [{"other": ["config", 1, 2, 3.0]}] -1|2020-09-15T11:01:20.381Z|INFO|MainThread|__exit__|transactions.py#54||Transaction [txn-T0001-20200914-00005]: Exit [Command] +```txt +1|2020-09-22T11:43:22.760Z|INFO|Dummy-1|__enter__|transactions.py#124|tango-device:log/test/upstream|Transaction [txn-local-20200922-232544376]: Enter[CallWithContext] with parameters[{"ArgKey2": "ArgVal2"}] +1|2020-09-22T11:43:22.782Z|INFO|Dummy-1|__exit__|transactions.py#133|tango-device:log/test/upstream|Transaction[txn-local-20200922-232544376]: Exit[CallWithContext] ``` **Example ska formatted logs for failed transaction** -```bash -1|2020-09-15T10:54:17.266Z|INFO|MainThread|__enter__|transactions.py#46||Start transaction Scan, txn-T0001-20200914-00005, {"other": ["config", 1, 2, 3.0]} - -1|2020-09-15T10:54:17.266Z|ERROR|MainThread|__exit__|transactions.py#51||Transaction application encountered exception executing Scan, txn-T0001-20200914-00005 -Traceback (most recent call last): - File "/ska-telescope/ska-logging/tests/test_transactions.py", line 93, in test_exception_logs_transaction_id_and_command - raise RuntimeError("Something went wrong") -RuntimeError: Something went wrong -1|2020-09-15T10:54:17.266Z|INFO|MainThread|__exit__|transactions.py#54||Exit transaction Scan, txn-T0001-20200914-00005 - +```txt +1|2020-09-22T11:45:07.122Z|ERROR|Dummy-1|__exit__|transactions.py#131|tango-device:log/test/upstream|Transaction[txn-local-20200922-362753747]: Exception[CallRaisesException] +Traceback (most recent call last): + File "LogTestUpstream.py", line 47, in CallRaisesException + raise RuntimeError("An exception has occured") +RuntimeError: An exception has occured +1|2020-09-22T11:45:07.123Z|INFO|Dummy-1|__exit__|transactions.py#133|tango-device:log/test/upstream|Transaction[txn-local-20200922-362753747]: Exit[CallRaisesException] ``` Requirements