toJSON method is added.
observers for different types of loggers are added.