Skip to content

Commit

Permalink
#174 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 26, 2023
1 parent 5bfc895 commit e633cfd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Expand Up @@ -28,6 +28,21 @@ class Foo {
}
```

Besides standard `%s` placeholders inside the format string, you can use
other custom ones, which help formatting common values faster:

* `%[file]s` --- absolute file name ➜ file name relative to current directory
* `%[text]s` --- any string ➜ pretty looking text, short enough, and escaped
* `%[exception]s` --- `Exception` ➜ stacktrace
* `%[list]s` --- `Iterable` ➜ pretty formatted list, in one line
* `%[size]s` --- size in bytes ➜ Kb, Mb, Gb, Tb, and so on
* `%[msec]s` --- milliseconds ➜ ms, sec, min, hours, etc.
* `%[nano]s` --- nanoseconds ➜ µs, ms, sec, min, hours, etc.
* `%[type]s` --- `Class<?>` ➜ name of it
* `%[secret]s` --- any string ➜ stars

You are welcome to suggest your own "decors".

## How to contribute?

Fork the repository, make changes, submit a pull request.
Expand Down

0 comments on commit e633cfd

Please sign in to comment.