updated logger log func