-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix line handling when
caller
is not present, added support for log…
…ger name
- Loading branch information
Showing
7 changed files
with
124 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
## Unreleased | ||
## 0.3.0 | ||
|
||
- [Fix] Fix formatting when `caller` is not present | ||
- [Improvement] The flag `-all` (or `--all`) can now be used to show fields that are filtered out by default | ||
- [Improvement] More fields are filtered by defaults for Zapdriver format (`labels`, `serviceContext`, `logging.googleapis.com/labels` & `logging.googleapis.com/sourceLocation` are filtered out by default now). | ||
- [Fix] Stacktrace are now properly printed when your log format is the Zap production standard one. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" | ||
|
||
main() { | ||
pushd "$ROOT" &> /dev/null | ||
|
||
dry_run="true" | ||
|
||
while getopts "hf" opt; do | ||
case $opt in | ||
h) usage && exit 0;; | ||
f) dry_run="false";; | ||
\?) usage_error "Invalid option: -$OPTARG";; | ||
esac | ||
done | ||
shift $((OPTIND-1)) | ||
|
||
version="$1"; shift | ||
|
||
if [[ $version == "" ]]; then | ||
usage_error "parameter <version> is required" | ||
fi | ||
|
||
args="" | ||
if [[ $dry_run == "true" ]]; then | ||
args="--skip-publish" | ||
fi | ||
|
||
goreleaser --rm-dist $args | ||
} | ||
|
||
usage_error() { | ||
message="$1" | ||
exit_code="$2" | ||
|
||
echo "ERROR: $message" | ||
echo "" | ||
usage | ||
exit ${exit_code:-1} | ||
} | ||
|
||
usage() { | ||
echo "usage: release [-f] <version>" | ||
echo "" | ||
echo "Perform the commands necessary to release a new version of the project, mainly" | ||
echo "it does its tasks by calling 'goreleaser' and performing some Git commands." | ||
echo "" | ||
echo "The script runs in dry run automatically unless the '-f' option is provided." | ||
echo "" | ||
echo "Tasks" | ||
echo " ?" | ||
echo "" | ||
echo "" | ||
echo "Options" | ||
echo " -h Display help about this script" | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
module github.com/maoueh/zap-pretty | ||
|
||
go 1.16 | ||
|
||
require ( | ||
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381 | ||
github.com/stretchr/testify v1.3.0 | ||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e | ||
) | ||
|
||
go 1.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters