googleapis / nodejs-common

🚀🐢 A set of classes and utilities used in Google npm modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use es6 classes and exports in logger.ts

JustinBeckwith opened this issue · comments

Logger.ts currently uses the export = Logger style syntax. Lets move towards explicit exported classes or functions and es module syntax.

@JustinBeckwith Should we turn Logger into a class? It seems to depend on log-driver right now but maybe we can use this opportunity to change that?

I'm not sure if it should be a class or just exported functions 🤷‍♂️ as long as it's using es modules, I'm happy. On the log-driver dependency - I'm all for chopping out dependencies we don't need, but I am trying to avoid breaking changes to the library right now. So far I think we've kept it compatible, and at the moment I'd like to preserve the API. If we can do that while chopping the dependency, and not adding too much code, I'm all for it.