If the session id is known, it will be logged together with all messages. If present, the session id appears, enclosed in paranthesis, right after the message category. E.g. 2017-08-30 12:20:49 warning: (4711) [masking] The rule ...
alter server