Contextlog implementation

Done.