Skip to content

[log] Add log config struct #16

@at15

Description

@at15

Duplicated with #3

Now every time you want to use yaml config the logger, you need to write your own struct, and write the apply method to update the logger, which is annoying, the log package should ship with a config struct, and the config package should have an interface for validate, noXXX, apply, and maybe an empty object for pojo config, so you can use embedding instead of writing empty methods to satisfies the interface

  • set color is not supported in formatter interface, so does time format
  • pkg filter should also be considered
  • also we can't config third party library that is using the log package (which is allowed in Java land, i.e. solr's admin page allow you to config all the package's logging level on the fly), maybe the logger should register itself to a singleton (addressed in v2 [Partial] Log v2 switch to handler and introduce hierarchy #28 )

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions