Merge pull request #2590 from vlakoff/develop

Fix noneffective static variable cache in log_message()