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

feat: updated logger to use metadata #9

Merged
merged 10 commits into from
Sep 26, 2022

Conversation

amanjain14
Copy link
Contributor

No description provided.

@amanjain14
Copy link
Contributor Author

Input

logger.info(
    "this is the message",
    { test: "124" },
    {
        error: "this is aerror",
        moreaaTest: "more adetails",
        good: {
            error: "this is error",
            moreTest: "more details",
            evenMore: {
                erraor: "this is error",
                moreaTest: "more details",
                good: {
                    eraaror: "this is error",
                    moreaaaTest: "more details"
                }
            }
        }
    },
    { tesat: "124" },
    { tesat: "124" }
);

Output

{
    "level": "info",
    "message": "this is the message",
    "metadata": {
        "error": "this is error",
        "good": {
            "error": "this is error",
            "evenMore": {
                "erraor": "this is error",
                "good": {
                    "eraaror": "this is error",
                    "moreaaaTest": "more details"
                },
                "moreaTest": "more details"
            },
            "moreTest": "more details"
        },
        "moreaaTest": "more details",
        "tesat": "124",
        "test": "124"
    },
    "service": "test",
    "timestamp": "2022-09-26T13:39:11.980Z",
    "type": "application"
}

@prathap-safe prathap-safe merged commit 90ac756 into Safe-Security:main Sep 26, 2022
Copy link
Contributor

@aneeshrelan aneeshrelan left a comment

Choose a reason for hiding this comment

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

image

Neat!

aneeshrelan added a commit that referenced this pull request Sep 26, 2022
github-actions bot pushed a commit that referenced this pull request Sep 30, 2022
# [1.2.0](v1.1.0...v1.2.0) (2022-09-30)

### Bug Fixes

* release v1.1.7 with reverted changes ([366809d](366809d))
* updated logger not to exit after logging an uncaughtException ([#7](#7)) ([da283a1](da283a1))

### Features

* added auto-release and logger to use metadata ([#11](#11)) ([e3703a3](e3703a3))
* added support to include service ([#6](#6)) ([b809dd2](b809dd2))
* Update logger to use metadata ([#12](#12)) ([1f66fe4](1f66fe4))

### Reverts

* Revert "feat: updated logger to use metadata (#9)" ([8c2b239](8c2b239)), closes [#9](#9)
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants