gokart icon indicating copy to clipboard operation
gokart copied to clipboard

Support structured logging

Open hirosassa opened this issue 5 years ago • 3 comments

For daily operations on public cloud environment, gokart should support structured logging. It enables us efficient searching, easy monitoring and alert configuration on logs. On the other hand, structured logging is not for human, so it needs to switch by an environmental variable or a configuration file.

example: https://github.com/hirosassa/gokart_structured_logging

hirosassa avatar Feb 10 '20 13:02 hirosassa

Hi, thanks for your PR! I just want to clarify the main goal of this PR.
I saw a provided example, you created logging.ini for configuration of logger. From what I understand, you want gokart to support structured logging without requiring users to manually configure logging.ini every time.

To achieve this, we could implement an automatic logging setup within gokart that switches between plain text and JSON format based on an environment variable like LOG_FORMAT=json.
Is my understanding correct? Or do you have any specific requirements in mind?

tyzerrr avatar Feb 22 '25 09:02 tyzerrr

@TlexCypher Thanks for your reply!

an automatic logging setup within gokart that switches between plain text and JSON format based on an environment variable like LOG_FORMAT=json

This is just a "what I want" feature 👍

hirosassa avatar Feb 22 '25 10:02 hirosassa

I understand what feature you want. I work on it.

tyzerrr avatar Feb 22 '25 12:02 tyzerrr