Skip to content

Commit

Permalink
docs(dashmate): document logging configuration (#2156)
Browse files Browse the repository at this point in the history
Co-authored-by: thephez <[email protected]>
  • Loading branch information
shumkov and thephez authored Sep 26, 2024
1 parent 1890a4c commit b001422
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions packages/dashmate/src/config/configJsonSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,28 +404,40 @@ export default {
filePath: {
type: ['null', 'string'],
minLength: 1,
description: 'Write logs only to stdout if null. Provide an absolute file path on'
+ ' the host machine to also write to a log file there. Use a log file if logs must be'
+ ' retained since stdout logs are stored inside the docker container'
+ ' and removed if the container is removed.',
},
debug: {
type: 'object',
properties: {
enabled: {
type: 'boolean',
description: 'Enable debug logging. Equivalent to setting "debug=1" in the Core configuration file)',
},
ips: {
type: 'boolean',
description: 'Include IP addresses in debug output',
},
sourceLocations: {
type: 'boolean',
description: 'Prepend debug output with name of the originating source'
+ ' location (source file, line number and function name)',
},
threadNames: {
type: 'boolean',
description: 'Prepend debug output with name of the originating thread (only'
+ ' available on platforms supporting thread_local)',
},
timeMicros: {
type: 'boolean',
description: 'Add microsecond precision to debug timestamps',
},
includeOnly: {
type: 'array',
uniqueItems: true,
description: 'Log all categories if empty. Otherwise, log only the specified categories.',
items: {
type: 'string',
enum: ['net', 'tor', 'mempool', 'http', 'bench', 'zmq', 'walletdb', 'rpc', 'estimatefee',
Expand All @@ -437,6 +449,7 @@ export default {
},
exclude: {
type: 'array',
description: 'Exclude debugging information for one or more categories.',
uniqueItems: true,
items: {
type: 'string',
Expand Down Expand Up @@ -654,10 +667,12 @@ export default {
properties: {
level: {
type: 'string',
description: 'Log level for gateway container logs',
enum: ['trace', 'debug', 'info', 'warn', 'error', 'critical', 'off'],
},
accessLogs: {
type: 'array',
description: 'Envoy access logs',
items: {
oneOf: [
{
Expand All @@ -667,7 +682,8 @@ export default {
type: 'string',
minLength: 1,
enum: ['stdout', 'stderr'],
description: 'Access log type: stdout, stderr or file',
description: 'stdout, stderr or file (absolute file path on host'
+ ' machine)',
},
format: {
type: 'string',
Expand All @@ -693,7 +709,9 @@ export default {
additionalProperties: {
type: 'string',
},
description: 'JSON fields and values. If null, default template is used.',
description: 'JSON fields and values. If null, default template is'
+ ' used. More info:'
+ ' https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#format-dictionaries',
},
},
required: ['template'],
Expand All @@ -703,7 +721,9 @@ export default {
properties: {
template: {
type: ['null', 'string'],
description: 'Template string. If null, default template is used.',
description: 'Template string. If null, default template is used.'
+ ' More info:'
+ ' https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#format-strings',
},
},
required: ['template'],
Expand Down Expand Up @@ -827,6 +847,7 @@ export default {
},
logs: {
type: 'object',
description: 'Define Drive logs',
propertyNames: {
type: 'string',
minLength: 1,
Expand All @@ -847,10 +868,13 @@ export default {
},
format: {
type: 'string',
description: 'Log format:'
+ ' https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/format/index.html',
enum: ['full', 'compact', 'pretty', 'json'],
},
color: {
type: ['boolean', 'null'],
description: 'Whether or not to use colorful output; defaults to autodetect',
},
},
required: ['destination', 'level', 'format', 'color'],
Expand Down Expand Up @@ -1115,17 +1139,21 @@ export default {
level: {
type: 'string',
enum: ['trace', 'debug', 'info', 'warn', 'error'],
description: 'Log verbosity level',
},
format: {
type: 'string',
enum: ['plain', 'json'],
description: 'Log format: text or json',
},
path: {
type: ['string', 'null'],
minLength: 1,
description: 'Write to stdout only if null or to stdout and specified log'
+ ' file (absolute file path on host machine)',
},
},
required: ['level', 'format'],
required: ['level', 'format', 'path'],
additionalProperties: false,
},
rpc: {
Expand Down

0 comments on commit b001422

Please sign in to comment.