-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Store log references in structured fields
- Loading branch information
1 parent
7e21ab9
commit 74c50ae
Showing
21 changed files
with
1,696 additions
and
329 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
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
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,37 @@ | ||
Directives | ||
========== | ||
|
||
Directives provide ways to modify Breadlog behaviour from within your code | ||
using comments. | ||
|
||
Disable use of structured logging | ||
--------------------------------- | ||
|
||
When using structured logging there may be some situations where you still | ||
want a log statement to contain a reference in its log message, rather than | ||
as a key-value pair. | ||
|
||
In these scenarios, add a comment to the line before the corresponding | ||
statement with the text ``breadlog:no-kvp``. | ||
|
||
For example: | ||
|
||
.. code-block:: rust | ||
// breadlog:no-kvp | ||
info!("[ref: 123] This log message will contain the reference, even when structured logging is on."); | ||
Ignore log statements | ||
--------------------- | ||
|
||
If you'd like Breadlog to ignore particular log statements, add a comment to | ||
the line before the statement with the text ``breadlog:ignore``. | ||
|
||
For example: | ||
|
||
.. code-block:: rust | ||
// breadlog:ignore | ||
info!("This log statement will be ignored by Breadlog."); | ||
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.