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

Improve handling of application log line prefixes #7

Open
benhalstead opened this issue Apr 15, 2019 · 1 comment
Open

Improve handling of application log line prefixes #7

benhalstead opened this issue Apr 15, 2019 · 1 comment
Labels
enhancement good first issue If you'd like to contribute, this is a good place to start help wanted
Milestone

Comments

@benhalstead
Copy link
Member

The meta-data printed in front of each line of application logging (e.g 15/Apr/2019:13:44:23 Z DEBUG [grncQueryManager] ) is controlled by:

  • The config file facility/config/logging.json
  • The builder facility/builder/logger/builder.go
  • The file logging/format.go and its associated test

The original concept was that an application could choose from a set of 'preset' prefixes or specify their own. In reality, there is one a default preset and if the application wants something different they need to provide their own format.

This change is to:

  • Remove the concept of presets
  • Move the definition of the default prefix out from the constant logging.PresetFormatFramework and into configuration at LogWriting.Format.PrefixFormat

There is also a bug where it is impossible to set empty string as the prefix which is definitely a foreseeable use-case. The ideal fix here is to change logging.LogMessageFormatter.PrefixFormat to *types.NilableString

@benhalstead benhalstead added help wanted good first issue If you'd like to contribute, this is a good place to start labels Apr 15, 2019
@benhalstead benhalstead added this to the v2.1.0 milestone Apr 15, 2019
@benhalstead benhalstead modified the milestones: v2.1.0, v2.2.0 Oct 22, 2019
@benhalstead
Copy link
Member Author

This involves removing public member variables - not suitable for a minor release. Moving to 3.0.0

@benhalstead benhalstead modified the milestones: v2.2.0, v3.0.0 Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue If you'd like to contribute, this is a good place to start help wanted
Projects
None yet
Development

No branches or pull requests

1 participant