Contextlog implementation

Make it a header