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

Give Agent a name in the logs to filter out logs related to experiments #280

Open
jlewi opened this issue Oct 6, 2024 · 1 comment
Open
Labels
good first issue Good for newcomers

Comments

@jlewi
Copy link
Owner

jlewi commented Oct 6, 2024

We run multiple instances of the agent with different configurations when we do evaluation. It would be useful to easily know which logs belong to a given instance of the agent. We could add an "agentName" field to the logs and then configure it as a field in the logger. We could specify agentName as the "metadata.name" in config.yaml

We can set the field just by setting it in the global instance of logr that we configure.

@jlewi jlewi added the good first issue Good for newcomers label Oct 6, 2024
@jlewi
Copy link
Owner Author

jlewi commented Oct 7, 2024

The datastructure for the configuration is defined

type AgentConfig struct {

Function to setup the logger is here

func (a *App) SetupLogging(logToFile bool) error {

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

No branches or pull requests

1 participant