VISULOX 5 Documentation
5.0.3 5.0.2 5.0.1
5.0.3 5.0.2 5.0.1

Logger Setting with CLI

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:

Bash
sudo /opt/visulox-portal/bin/vlx-portald config log get

If the default Portal configuration file is not found, pass it explicitly:

Bash
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:

Bash
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:

Bash
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

--level

Log level: panic, fatal, error, warn, warning, info, debug, or trace.

--log-level

Alias for --level.

--environment

Environment label.

--release

Release label.

Quote values that contain spaces:

Bash
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):

Bash
sudo /opt/visulox-portal/bin/vlx-portald config log set-basic --log-level debug

Prompt for every field:

Bash
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

--rotation-max-size

Maximum rotated log size in MB.

--rotation-max-age

Maximum rotated log age in days.

--rotation-max-backups

Maximum number of backup files.

--rotation-local-time

Use local time in rotated filenames.

--rotation-compress

Compress rotated files.

Bash
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

--enabled

Enable or disable Sentry.

--sentry-enabled

Alias for --enabled.

--dsn

Sentry DSN.

--sentry-dsn

Alias for --dsn.

Bash
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

--enabled, --loki-enabled

Enable or disable Loki.

--url, --loki-url

Loki push URL. It must end with /loki/api/v1/push.

--tenant-id

Loki tenant ID.

--auth-token

Loki authentication token.

--service-name

Service label sent with log streams.

--host-label

Host label sent with log streams.

--queue-size

Client queue capacity.

--batch-size

Entries sent per batch.

--flush-interval-ms

Flush interval in milliseconds.

--request-timeout-ms

Request timeout in milliseconds.

--max-retries

Maximum number of retries.

--initial-backoff-ms

Initial retry backoff in milliseconds.

--max-backoff-ms

Maximum retry backoff in milliseconds.

--drop-when-queue-full

Drop new entries instead of blocking when the queue is full.

Partial update (remaining fields are prompted):

Bash
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:

Bash
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:

Bash
sudo /opt/visulox-portal/bin/vlx-portald config log get

See Also