Automatic account id initialization for logs

- Moved account id initialization to log class, so that logging
interfaces would not need to know how to get account id.