Use the Config CLI on a VISULOX Portal host to view and change the logger settings that the Portal stores in the database. Those settings apply to all Portal processes.
Run every command as root. On an installed host, prefix the Portal binary with sudo.
Requirements
The command must be run as root:
sudo /opt/visulox-portal/bin/vlx-portald config log get
If the default Portal configuration file is not found, pass it explicitly:
sudo /opt/visulox-portal/bin/vlx-portald \
--configFile /opt/visulox-portal/configs/config.json \
config log get
Use --help on any command to list its flags:
sudo /opt/visulox-portal/bin/vlx-portald config log --help
sudo /opt/visulox-portal/bin/vlx-portald config log set-loki --help
Commands
config log get
config log set-basic
config log set-log-rotation
config log set-sentry
config log set-loki
View Current Settings
get prints the effective logger settings. The default is a table. Use JSON for scripts:
sudo /opt/visulox-portal/bin/vlx-portald config log get
sudo /opt/visulox-portal/bin/vlx-portald config log get --format std
sudo /opt/visulox-portal/bin/vlx-portald config log get --format json
--format accepts only std or json.
The table includes basic logging, log rotation, Sentry, and Loki. The log file path is shown for reference and cannot be changed with this CLI. Sentry DSN and Loki authentication token values are always shown as *******.
Avoid passing secrets on the command line. They can appear in shell history or the process list. When you omit those flags, the CLI prompts for them and hides the typed value.
How Updates Work
Each set-* command accepts flags and interactive prompts:
-
A flag you provide is applied as the new value.
-
A flag you omit is asked interactively, with the current value as the default.
-
Press Enter to keep the current value.
-
If you supply every flag, the command does not prompt.
Omitted fields are not reset. To set a boolean to false, pass it explicitly, for example --enabled=false.
set-basic
Updates the log level and the environment and release labels.
|
Flag |
Description |
|---|---|
|
|
Log level: panic, fatal, error, warn, warning, info, debug, or trace. |
|
|
Alias for |
|
|
Environment label. |
|
|
Release label. |
Quote values that contain spaces:
sudo /opt/visulox-portal/bin/vlx-portald config log set-basic \
--environment "Production Environment" \
--release "VISULOX 5.3 Release Candidate" \
--log-level debug
Change only the log level (you are prompted for the other fields):
sudo /opt/visulox-portal/bin/vlx-portald config log set-basic --log-level debug
Prompt for every field:
sudo /opt/visulox-portal/bin/vlx-portald config log set-basic
set-log-rotation
Updates how log files are rotated. The log file path cannot be changed here.
|
Flag |
Description |
|---|---|
|
|
Maximum rotated log size in MB. |
|
|
Maximum rotated log age in days. |
|
|
Maximum number of backup files. |
|
|
Use local time in rotated filenames. |
|
|
Compress rotated files. |
sudo /opt/visulox-portal/bin/vlx-portald config log set-log-rotation \
--rotation-max-size 20 \
--rotation-max-age 14 \
--rotation-max-backups 5 \
--rotation-local-time=true \
--rotation-compress=true
set-sentry
Enables or disables Sentry and sets the DSN. When Sentry is enabled, the DSN is validated and the endpoint is checked before the change is saved.
|
Flag |
Description |
|---|---|
|
|
Enable or disable Sentry. |
|
|
Alias for |
|
|
Sentry DSN. |
|
|
Alias for |
sudo /opt/visulox-portal/bin/vlx-portald config log set-sentry \
--enabled=true \
--dsn "https://public-key@sentry.example.com/123"
set-loki
Updates Loki logging. When Loki is enabled, the URL is validated and the endpoint is checked before the change is saved.
|
Flag |
Description |
|---|---|
|
|
Enable or disable Loki. |
|
|
Loki push URL. It must end with |
|
|
Loki tenant ID. |
|
|
Loki authentication token. |
|
|
Service label sent with log streams. |
|
|
Host label sent with log streams. |
|
|
Client queue capacity. |
|
|
Entries sent per batch. |
|
|
Flush interval in milliseconds. |
|
|
Request timeout in milliseconds. |
|
|
Maximum number of retries. |
|
|
Initial retry backoff in milliseconds. |
|
|
Maximum retry backoff in milliseconds. |
|
|
Drop new entries instead of blocking when the queue is full. |
Partial update (remaining fields are prompted):
sudo /opt/visulox-portal/bin/vlx-portald config log set-loki \
--enabled=true \
--url "https://logs.example.com/loki/api/v1/push" \
--tenant-id "Production Tenant"
All flags, with no prompts:
sudo /opt/visulox-portal/bin/vlx-portald config log set-loki \
--enabled=true \
--url "https://logs.example.com/loki/api/v1/push" \
--tenant-id "Production Tenant" \
--auth-token "replace-with-secret" \
--service-name "vlx-portal" \
--host-label "portal-01" \
--queue-size 5000 \
--batch-size 200 \
--flush-interval-ms 1000 \
--request-timeout-ms 3000 \
--max-retries 4 \
--initial-backoff-ms 200 \
--max-backoff-ms 2000 \
--drop-when-queue-full=true
Check the Result
After a change, display the settings again:
sudo /opt/visulox-portal/bin/vlx-portald config log get