TRUNK-3979: LoggingAdvice should also log which user is performing an action when an error occurs

Null check and taking systemId if username is empty

User null check

Fix of code duplication