8000 Added documentation for feature/escaping-unicode-control-chars (#771) · arangodb/docs@446fc10 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 446fc10

Browse files
authored
Added documentation for feature/escaping-unicode-control-chars (#771)
1 parent 1b0a65e commit 446fc10

File tree

2 files changed

+71
-14
lines changed

2 files changed

+71
-14
lines changed

3.9/programs-arangod-log.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,27 +141,45 @@ Format | Example | Description
141141

142142
## Escaping
143143

144-
`--log.escape value`
144+
There are two flags for retaining or escaping control and Unicode characters in
145+
the log. The flag `--log.escape` is deprecated since v3.9.0, and instead,
146+
the new flags `--log.escape-control-chars` and `log.escape-unicode-chars`
147+
should be used.
145148

146-
This option toggles the escaping of log output.
149+
- `--log.escape-control-chars`:
147150

148-
If set to `true`, the following characters in the log output are escaped:
151+
This flag applies to the control characters, that have hex codes below `\x20`,
152+
and also the character `DEL` with hex code `\x7f`.
149153

150-
- the carriage return character (hex `0d`)
151-
- the newline character (hex `0a`)
152-
- the tabstop character (hex `09`)
153-
- any other characters with an ordinal value less than hex `20`
154+
When the flag value is set to `false`, control characters will be retained
155+
when they have a visible representation, and replaced with a space character
156+
in case they do not have a visible representation. For example, the control
157+
character `\n` is visible, so a `\n` will be displayed in the log. Contrary,
158+
the control character `BEL` is not visible, so a space will be displayed
159+
instead.
154160

155-
If the option is set to `false`, no characters are escaped. Characters with
156-
an ordinal value less than hex `20` will not be printed in this mode but will
157-
be replaced with a space character (hex `20`).
161+
When the flag value is set to `true`, the hex code for the character is
162+
displayed, for example, the `BEL` character will be displayed as its hex code,
163+
`\x07`.
164+
165+
The default value for this flag is `true` to ensure compatibility with
166+
previous versions.
167+
168+
- `--log.escape-unicode-chars`:
169+
170+
If its value is set to `false`, Unicode characters will be retained and
171+
written to the log as-is. For example, `` will be logged as ``. If the
172+
flag value is set to `true`, any Unicode characters are escaped, and the hex
173+
codes for all Unicode characters are logged instead. For example, `` would
174+
be logged as its hex code, `\u72AC`.
175+
176+
The default value for this flag is set to `false` for compatibility with
177+
previous versions.
158178

159179
A side effect of turning off the escaping is that it will reduce the CPU
160180
overhead for the logging. However, this will only be noticeable when logging
161181
is set to a very verbose level (e.g. debug or trace).
162182

163-
The default value for this option is `true`.
164-
165183
## Maximum line length
166184

167185
<small>Introduced in: v3.7.9</small>

3.9/release-notes-new-features39.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ FOR v, e, p IN 10 OUTBOUND @start GRAPH "myGraph"
9595
The condition `v.isRelevant == true` is stored in the variable `pruneCondition`,
9696
and later used as a condition for `FILTER`.
9797

98-
See [Pruning](aql/graphs-traversals.html#pruning)
98+
See [Pruning](aql/graphs-traversals.html#pruning).
9999

100100
### Upsert with Index Hint
101101

@@ -291,6 +291,45 @@ convention for both datacenters to avoid incompatibilities.
291291

292292
Also see [Database Naming Conventions](data-modeling-naming-conventions-database-names.html).
293293

294+
### Logging
295+
296+
The server now has two flags for retaining or escaping control and Unicode
297+
characters in the log. The flag `--log.escape` is now deprecated and, instead,
298+
the new flags `--log.escape-control-chars` and `--log.escape-unicode-chars`
299+
should be used.
300+
301+
- `--log.escape-control-chars`:
302+
303+
This flag applies to the control characters, that have hex codes below `\x20`,
304+
and also the character `DEL` with hex code `\x7f`.
305+
306+
When the flag value is set to `false`, control characters will be retained
307+
when they have a visible representation, and replaced with a space character
308+
in case they do not have a visible representation. For example, the control
309+
character `\n` is visible, so a `\n` will be displayed in the log. Contrary,
310+
the control character `BEL` is not visible, so a space will be displayed
311+
instead.
312+
313+
When the flag value is set to `true`, the hex code for the character is
314+
displayed, for example, the `BEL` character will be displayed as its hex code,
315+
`\x07`.
316+
317+
The default value for this flag is `true` to ensure compatibility with
318+
previous versions.
319+
320+
- `--log.escape-unicode-chars`:
321+
322+
If its value is set to `false`, Unicode characters will be retained and
323+
written to the log as-is. For example, `` will be logged as ``. If the
324+
flag value is set to `true`, any Unicode characters are escaped, and the hex
325+
codes for all Unicode characters are logged instead. For example, `` would
326+
be logged as its hex code, `\u72AC`.
327+
328+
The default value for this flag is set to `false` for compatibility with
329+
previous versions.
330+
331+
Also see [Logging](programs-arangod-log.html).
332+
294333
### Version information
295334

296335
The _arangod_ server now provides a command `--version-json` to print version
@@ -433,7 +472,7 @@ This will turn the numeric-looking values in the `key` attribute into strings
433472
but treat the attributes `price` and `weight` as numbers. Finally, the values in
434473
attribute `fk` will be treated as strings again.
435474

436-
See [Overriding data types per attribute](programs-arangoimport-examples-csv.html#overriding-data-types-per-attribute)
475+
See [Overriding data types per attribute](programs-arangoimport-examples-csv.html#overriding-data-types-per-attribute).
437476

438477
### arangobench
439478

0 commit comments

Comments
 (0)
0