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

Comments

@benhalstead
Copy link
Member

@benhalstead benhalstead commented Apr 15, 2019

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
Copy link
Member Author

@benhalstead benhalstead commented Mar 10, 2020

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.