2024-12-21 10:11:47 +00:00
|
|
|
Low-level "generic" signal creator for creating signals of any "kind".
|
|
|
|
|
Takes a single map of options [2] with compile-time keys.
|
2024-03-11 08:49:56 +00:00
|
|
|
|
2024-12-21 10:11:47 +00:00
|
|
|
Default kind: `:generic` (feel free to change!)
|
2024-11-01 14:51:06 +00:00
|
|
|
Default level: `:info`
|
2025-03-03 08:36:40 +00:00
|
|
|
Returns:
|
|
|
|
|
- If given `:run` form: unconditionally returns run value, or rethrows run error.
|
|
|
|
|
- Otherwise: returns true iff signal was created (allowed by filtering).
|
2024-03-11 08:49:56 +00:00
|
|
|
|
2024-04-15 07:57:40 +00:00
|
|
|
When filtering conditions are met [4], creates a Telemere signal [3] and
|
2024-04-12 12:57:24 +00:00
|
|
|
dispatches it to registered handlers for processing (e.g. writing to
|
|
|
|
|
console/file/queue/db, etc.).
|
2024-03-11 08:49:56 +00:00
|
|
|
|
|
|
|
|
Generic signals are fairly low-level and useful mostly for library authors or
|
|
|
|
|
advanced users writing their own wrapper macros. Regular users will typically
|
2024-04-12 12:57:24 +00:00
|
|
|
prefer one of the higher-level signal creators optimized for ease-of-use in
|
2024-04-15 07:57:40 +00:00
|
|
|
common cases [1].
|
2024-03-11 08:49:56 +00:00
|
|
|
|
|
|
|
|
Tips:
|
|
|
|
|
|
2024-03-29 11:30:02 +00:00
|
|
|
- Test using `with-signal`: (with-signal (signal! ...)).
|
2024-04-15 07:57:40 +00:00
|
|
|
- Supports the same options [2] as other signals [1].
|
2024-03-11 08:49:56 +00:00
|
|
|
|
2024-05-14 11:48:35 +00:00
|
|
|
----------------------------------------------------------------------
|
2024-04-15 07:57:40 +00:00
|
|
|
[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)
|
|
|
|
|
[2] See `help:signal-options` - {:keys [kind level id data ...]}
|
|
|
|
|
[3] See `help:signal-content` - {:keys [kind level id data ...]}
|
2024-05-14 11:48:35 +00:00
|
|
|
[4] See `help:signal-filters` - (by ns/kind/id/level, sampling, etc.)
|