#256: logger: fixed a bug about function.apply