Contextlog implementation

I suggest to make it a package