8000 clean up plugin logging by rade · Pull Request #2074 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

clean up plugin logging #2074

Merged
merged 5 commits into from
Mar 29, 2016
Merged

clean up plugin logging #2074

merged 5 commits into from
Mar 29, 2016

Conversation

rade
Copy link
Member
@rade rade commented Mar 20, 2016

consistency, consistency, consistency

and elimination of dot imports.

@rade rade force-pushed the cleanup-plugin-logging branch from ee93ba0 to 1a2d132 Compare March 20, 2016 14:49
@rade rade mentioned this pull request Mar 20, 2016
8000
@rade rade changed the title Cleanup plugin logging clean up plugin logging Mar 20, 2016
@awh awh added this to the 1.5.0 milestone Mar 21, 2016
@awh
Copy link
Contributor
awh commented Mar 21, 2016

Needs rebase

@awh awh assigned rade Mar 21, 2016
@rade rade force-pushed the cleanup-plugin-logging branch 3 times, most recently from 4ab778c to 35eb05c Compare March 22, 2016 16:31
@rade rade assigned awh and unassigned rade Mar 22, 2016
@rade rade force-pushed the cleanup-plugin-logging branch from 35eb05c to 448b1b6 Compare March 24, 2016 18:07
rade added 5 commits March 24, 2016 18:51
CNI is invoked from the command line; so there is no point in getting
clever about logging.
It is a library function, so logging of any errors should be left to
the caller.

We also get rid of a logged warning which contained the complete data
structure returned by netlink.LinkByName.

So this function now does no logging at all. Which is how it should be.
Consistency, consistency, consistency:

- prefix all log messages with "[net]" - important since the same
  process acts as both a network and ipam driver
- include the API function name in all log messages
- log request and response details at debug level
- log request summary at info level
- log ContainerStarted as a pseudo API function, but only at debug
  level (since it can be quite high volume)

And eliminate some dot imports.
prefix all log entries with "[ipam]"

Also eliminate a dot import.
- log requests at info  level instead of debug level
- log errors   at error level instead of debug level
@rade rade force-pushed the cleanup-plugin-logging branch from 448b1b6 to 4482d30 Compare March 24, 2016 18:53
@rade
Copy link
Member Author
rade commented Mar 24, 2016

@awh this is ready (again)

@awh awh merged commit 7c37cd9 into master Mar 29, 2016
@awh awh deleted the cleanup-plugin-logging branch March 29, 2016 09:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0