Contextlog implementation

use numbered arguments instead of duplicating