You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,23 +20,24 @@ npm install strog
20
20
21
21
## How It Works
22
22
23
-
Strog appends structured metadata to your log messages using invisible Unicode characters as delimiters. This approach keeps logs human-readable while making them machine-parsable.
23
+
Strog appends structured metadata to your log messages on a separate line, making logs both human-readable and machine-parsable.
24
24
25
-
### The Magic: Unicode Delimiters
25
+
### The Magic: Newline Separation
26
26
27
-
When you create a structured log, Strog appends metadata after your message using special Unicode characters:
27
+
When you create a structured log, Strog appends metadata after your message on a new line:
-**Development** (`encode: false`): Uses **Thin Space** (`\u2009`) - metadata is visible in console output
39
-
-**Production** (`encode: true`): Uses **Zero-Width Space** (`\u200B`) - metadata is hidden from console output, base64 encoded and still available to log processors (tails)
39
+
-**Development** (`encode: false`): Metadata appears as readable JSON on the next line
40
+
-**Production** (`encode: true`): Metadata is base64 encoded and prefixed with zero-width space (`\u200B`) for identification
40
41
41
42
### Log Processing & Tail Workers
42
43
@@ -47,7 +48,7 @@ The same library can be used in log processors to extract the structured data:
0 commit comments