Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic implementation #1

Merged
merged 7 commits into from
May 8, 2018
Merged

Basic implementation #1

merged 7 commits into from
May 8, 2018

Conversation

nerac
Copy link
Contributor

@nerac nerac commented Apr 5, 2018

No description provided.

@nerac nerac requested review from joejean and rubanour April 5, 2018 11:10
@tedj
Copy link

tedj commented Apr 5, 2018

👍

@nerac nerac requested a review from tedj April 5, 2018 11:23
@rubanour rubanour force-pushed the basics branch 3 times, most recently from a4ce16b to c287bb0 Compare April 11, 2018 11:21
@nerac nerac requested a review from hossam-fares April 24, 2018 06:43
@rubanour rubanour force-pushed the basics branch 2 times, most recently from 086a964 to 8b94d45 Compare April 24, 2018 06:51
@@ -0,0 +1 @@
// TO be added :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

};

module.exports = logger;
module.exports.default = logger;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? Maybe tomorrow we'll add more methods to export and is good to remember that you can default to one of them 😁

index.js Outdated
};
});

logger.setLevel = (level) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be great if u can provide an example of usage for setLevel in the readme.

timestamp(),
format.json(),
),
transports: [new transports.Console({ json: true })],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think if we make transports configurable and the default option to be transports.Console?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is a great idea! I was considering to do it in a newer PR as it seems complex, not critical and we need the SRE team feedback ;)

const TEST_STRING = 'hello world!';
const TEST_OBJ = {h:1};

describe('DeliveryPromise', () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D


// define Logger
const logger = {};
Object.keys(log.levels).forEach((level) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should find a way to simplify this part, but for now is more than enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rubanour for me is approved 😛

@nerac nerac merged commit b731bc5 into master May 8, 2018
rubanour pushed a commit that referenced this pull request May 8, 2018
* First commit

* Added basic library

* Support multi params logging

* combine format functions

* flat export log level function

* Added tests

* change test approach a little
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants