Fork clog for personal use
This is a fork of clog for personal use. It didn't seem worthwhile to
reimplement this when I was able to open source it before leaving
Kochava. The main reason for forking is that I would like the ability
to make breaking changes to the library that I don't think Kochava has
any need for (the state I left the original in is stable). Currently,
the main difference here is the removal of all the constructor
functions, because they don't have any real benefit over using what Zap
already provides via its level flags.
Fix README example
Move it into example_test.go so that it can be checked as well.
Add README, tidy go.mod, and add package comment
Doing this ahead of open sourcing it just so it's a little clean.
Merge branch 'add-circleci'
* add-circleci:
ci: Migrate to CircleCI
Signed-off-by: Noel Cower <ncower@gmail.com>
ci: Migrate to CircleCI
Removes .gitlab-ci.yml and replaces it with a default-ish CircleCI
config.
Closes #1.
Migrate to GitHub
This changes the package URL -- we're effectively treating this as
a new package, not the same one.
Fix log level not being set in Config
Log level defaults to whatever's set in the particular config style
used (production or development) and doesn't respect caller choice.
This is probably a bug that was introduced when clog was refactored in
moving it to ireland.
Add coverage field to .gitlab-ci.yml
Fix output flag on go tool cover
'o', not 'out'.
Switch to Debian-based Go image
Don't really feel like installing git on every run.
Add tags missing from CI task
After spending the last.. I don't know, several months, in Travis CI,
it's really annoying what's necessary to do this stuff. CircleCI would
also be nice.
Add CI script
This just runs the tests.
Add tests
Tests cover:
- Logger configuration
- Context loggers
Basically, it's just running config through a virtual environment (a
map of strings) to test configuration / argv0 process naming.
For context logging, it just assigns a logger that writes to an
observer and checks that the counts on those are valid before / after
filtering.
Simplify configuration
Replaces the json/debug flags with a single isDev flag. This probably
falls under things that someone would brand as "opinionated" but the
goal here is to make it as clear-cut as possible when something is
production or development.
Check errors on ParseBool
This is primarily to shut linters up.
Remove unused LogFunc type
This isn't used in-package, so there's no reason to keep it.
Remove skipCallFrame
Pretty sure that was in there for some reason but stopped being used.
Clean up NewFromEnv
Had a gross nested conditional that didn't work well. Can't suffer
that, so there's a new function for getting config from the
environment.