Skip to content

Commit

Permalink
Merge pull request #441 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 12.105.0
  • Loading branch information
andyone authored Mar 17, 2024
2 parents 6c539ab + 1592e6f commit 07b7d3a
Show file tree
Hide file tree
Showing 12 changed files with 793 additions and 72 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changelog

### 12.105.0

* `[log]` Added JSON output format
* `[log]` Added caller info to messages
* `[strutil]` Added method `IndexByteSkip`
* `[timeutil]` Added method `FromISOWeek`
* `[log]` Code refactoring

### 12.104.0

* `[knf/united]` Added validation using `knf` validators
Expand Down
2 changes: 1 addition & 1 deletion ek.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //

// VERSION is current ek package version
const VERSION = "12.104.0"
const VERSION = "12.105.0"

// ////////////////////////////////////////////////////////////////////////////////// //

Expand Down
2 changes: 1 addition & 1 deletion knf/united/united.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package united provides KNF configuration extended by enviroment variables and options
// Package united provides KNF configuration extended by environment variables and options
package united

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
17 changes: 17 additions & 0 deletions log/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,25 @@ func Example() {
logger.Error("This is error message")
logger.Crit("This is critical message")

// Enable colors for output
logger.UseColors = true

// Encode messages to JSON
logger.UseJSON = true

// Print caller info
logger.WithCaller = true

// Use custom date & time layout
logger.TimeLayout = time.RFC3339

// Add fields to message
logger.Debug("This is %d %s message", 2, "debug", F{"user", "bob"}, F{"id", 200})

// AUX message it's unskippable message which will be printed to log file with
// any minimum level
//
// Note that all AUX messages are dropped when using JSON format
logger.Aux("This is aux message")

// Print simple divider
Expand Down
Loading

0 comments on commit 07b7d3a

Please sign in to comment.