Using Metatrader 4 version 625 i have changed OutputDebugStringA to OutputDebugStringW and log() started working