rookie-ninja / rk-boot

Build microservice with rk-boot and let the team take over clean and tidy code.

Home Page:https://rkdev.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there anyway to configure the default event log at stdout when starting app?

emilebui opened this issue · comments

Hi, is there any possible way to disable the stdout event log or configurate it to generate log in file instead when starting app

image

Here is the configuration of event log docs with Echo framework.

https://docs.rkdev.info/user-guide/web/echo/logging/#concept

In your case, I think bellow configuration will work.

event:
  - name: my-event
    outputPaths: [""]   # set to empty if want to ignoring all event logs
echo:
  - name: greeter
    port: 8080
    enabled: true
    eventEntry: my-event

It still doesn't work in my case, I have tried this method before.

In your configuration at boot.yaml file, this only configures the event log at my-event config, it is not the default stdout config. That's why it would not work

image

@emilebui I will create a demo package with the configuration ASAP. Maybe it is because of old version.

@emilebui Please try this example: https://github.com/rookie-ninja/rk-demo/tree/master/echo/v2/ignore-event

It works for me on my local machine. Also, please check rk-echo and rk-boot version in go.mod.

@dongxuny Sorry, I forgot the eventEntry: my-event configuration in my boot.yaml file, it works perfectly fine now, thanks a lot.