Page MenuHomePhorge

Sink: Improve logging system
Closed, ResolvedPublic

Description

The current logging system is not complicated enough, so let's fix that.

We currently only have a single logging area which can not represent the same code running in different software components.
Also, filtering is currently to cumbersome so it's always trace everything or nothing.

The plan is to fix that in the following way:

  • Logging is always done to a component AND and area. The component represents i.e. the process (kube, a resource, ....), although that doesn't necessarily correspond to a PID. Typically this will be some identifier. The area represents the static code area.
  • This will result in an assembled identifier in the form of: Component.Area (of course each part can have more parts to it so we get something like: Kube.{SomeResourceIdentifier}.Query.Foobar
  • These identifiers will be collected in a config file so we can do autocompletion on that.
  • On the filtering side we have have of wildcard matching on the assembled identifier so we can do stuff like: Kube.*.Query to get all queries that kube issues against a specific resource
  • sinksh gets implified commands with: sinksh trace $area, sinksh trace $area off, sinksh trace off.
  • sinksh supports autocompletion for the area (because otherwise this will be unusable)
  • Trace output is by default always off, so we really just enable trace output whenever we want to see something for that area/component only.

Details

Ticket Type
Task