Skip to content

Commit 03ab6bc

Browse files
committed
Update readme.
1 parent fe84ff3 commit 03ab6bc

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ In addition to logging function calls, `funlog` decorators also time the functio
2727
and can log arguments briefly but clearly, abbreviating arguments like long strings or
2828
dataclasses.
2929

30+
I'm publishing it standalone since I have found over the years I frequently want to drop
31+
it into projects. It's often even easier to use than quick print debugging.
32+
33+
In addition to logging calls, it lets you do very lightweight profiling by having
34+
warnings in production when certain functions are take more than a specified amount of
35+
time. Finally, you can use the decorators to get tallies of function calls and runtimes
36+
per function after a program runs a while or at exit.
37+
38+
It deliberately has **zero dependencies** and is a single file with ~500 lines of code.
39+
40+
## Options
41+
3042
The decorator is simple with reasonable defaults but is also fully customizable with
3143
optional arguments to the decorator.
3244
You can control whether to show arg values and return values:
@@ -46,21 +58,11 @@ By default both calls and returns are logged, but this is also customizable:
4658
If `if_slower_than_sec` is set, only log calls that take longer than that number of
4759
seconds.
4860

49-
By default, uses standard logging with the given `level`, but you can pass in a custom
50-
`log_func` to override that.
61+
By default, it uses standard logging with the given `level`, but you can pass in a
62+
custom `log_func` to override that.
5163

52-
By default, it shows values using `quote_if_needed()`, which is brief and very readable.
53-
You can pass in a custom `repr_func` to change that.
54-
55-
I'm publishing it standalone since I have found over the years I frequently want to drop
56-
it into projects. It's often even easier to use than quick print debugging.
57-
58-
It also lets you do very lightweight profiling by having warnings in production when
59-
certain functions are taking a lot of time.
60-
Finally, is easy to get tallies of function calls and runtimes per function after a
61-
program runs a while or at exit.
62-
63-
It deliberately has **zero dependencies** and is a single file with ~500 lines of code.
64+
Also by default, it shows values using `quote_if_needed()`, which is brief and very
65+
readable. You can pass in a custom `repr_func` to change that.
6466

6567
## Installation
6668

0 commit comments

Comments
 (0)