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

Add JsonFormatter support for the log #1847

Closed
andrejpetras opened this issue Apr 3, 2019 · 2 comments · Fixed by #5585
Closed

Add JsonFormatter support for the log #1847

andrejpetras opened this issue Apr 3, 2019 · 2 comments · Fixed by #5585
Labels
area/logging kind/enhancement New feature or request pinned Issue will never be marked as stale
Milestone

Comments

@andrejpetras
Copy link
Contributor

Hi,

it would be gread to have possibility to configure the JsonFormatter for the logs.
We can overwrite the configuration with a @BuildItem and StartupEvent but this is not nice.

For example:

 void onStart(@Observes StartupEvent ev) {
        ArrayList<Handler> handlers = new ArrayList(2);
        Formatter formatter = new JsonFormatter();
        ConsoleHandler handler = new ConsoleHandler(formatter);
        handler.setLevel(Level.INFO);
        handlers.add(handler);
        InitialConfigurator.DELAYED_HANDLER.setHandlers((Handler[]) handlers.toArray(EmbeddedConfigurator.NO_HANDLERS));
        log.info("The application is starting...");
    }

Thanks
Andrej

@gsmet gsmet added kind/enhancement New feature or request area/logging labels Apr 4, 2019
@dmlloyd dmlloyd self-assigned this May 6, 2019
dmlloyd added a commit to dmlloyd/quarkus that referenced this issue May 6, 2019
@dmlloyd dmlloyd removed their assignment Jul 8, 2019
@FreifeldRoyi
Copy link

+1

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you!
We are doing this automatically to ensure out-of-date issues does not stay around indefinitely.
If you believe this issue is still relevant please put a comment on it on why and if it truly needs to stay request or add 'pinned' label.

@stale stale bot added the stale label Nov 13, 2019
@dmlloyd dmlloyd added pinned Issue will never be marked as stale and removed stale labels Nov 13, 2019
@ia3andy ia3andy added this to the 1.1.0 milestone Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging kind/enhancement New feature or request pinned Issue will never be marked as stale
Projects
None yet
5 participants