Was this helpful?
Error Reporting--vectorwise.log
Errors and other messages for X100 are logged in the vectorwise.log file. The file is located in:
II_SYSTEM/ingres/files/vectorwise.log
or, for installations on Windows:
%ALLUSERSPROFILE%\Actian\VectorXX\files\vectorwise.log
Configuring X100 Error Reporting
You can configure error logging to vectorwise.log as follows:
Change the level of information logged for all or specific facilities.
Change the name and location of the log file.
Change the record format.
X100 Error Log Record Format
All parts of a log record are optional except for the message.
A log record has the following format:
[#][timestamp][PIDpid:][TIDtid:][SIDsid:][TXIDtxid:][QIDqid:][level:][facility:][file:line:]message
where:
#
The # sign prints for non-error level messages, per output.
timestamp
The timestamp of the message, which can be in one of two formats: ISO and milliseconds from epoch.
pid
The logging process ID
tid
The thread ID
sid
The x100 session ID
txid
The transaction ID
qid
The query ID (within session)
level:
The level of information logged. ERROR and WARN level messages are always logged.
facility:
The facility name
file:line
The source file and line that caused the message to be issued
message
The message text
X100 Error Log Configuration File
The file for configuring the X100 error log is named vwlog.conf and resides in the directory indicated by the II_CONFIG environment variable.
To see the value for II_CONFIG
Issue the following command at the operating system prompt:
ingprenv II_CONFIG
The vwlog.conf file delivered with Vector sets the default log level for all facilities to WARN and the output to the vectorwise.log file. It also contains log settings for specific facilities.
X100 Error Log Configuration File Format
Note:  The error log configuration file has the following format:
facility_name = facility_config | default= facility_config
filename = path/to/log_file_name
file = output_config
Each line in the configuration file configures one output, one facility, or additional options. Lines can be separated by a comma (for an example, see VWLOG Environment Variable--Configure Error Reporting). The # character marks a comment until end of the line (a comma does not end the comment).
where:
facility_name = facility_config
Specifies one or more logging options for the default (all facilities) or specified facility, as described in Facility Configuration.
filename = path/to/log_file_name
Specifies the file for FILE log output. The path can be absolute, or relative to II_LOG directory, if set, or to II_CONFIG directory otherwise.
Default name: vectorwise.log
Note:  The escaping option is not supported, i.e., when parsing /tmp/\"my\ dir\"/vectorwise.log, the '\' characters won't be removed. Similarly, /tmp/"my dir"/vectorwise.log is not supported. Instead, it is valid to use "/tmp/my dir/vectorwise.log" or /tmp/my dir/vectorwise.log
file = output_config
Configures the prefix of each log record. Separate each option with a colon (:). Valid output_config options are described in X100 Log Record Format Configuration.
X100 Log Record Format Configuration
The syntax for configuring log record output is as follows:
file = output_config
file = output_config
Specifies the output format for the log file. Separate each option by a colon (:). If no options are specified, only the message itself is displayed.
timestamp
Uses ISO timestamp. (Consider using with usec for 6-digit usec information.)
timesec
Uses sec.usec timestamp format. (Consider using with usec for 6 rather than 3 usec digits.)
showlevel
Displays level name TRACE, DEBUG or INFO before the message (ERROR and WARN level names are always displayed.)
comment
Displays # before all log lines except for ERROR level messages.
fileline
Displays source file name and line for each message.
pid
Shows logging process PID.
tid
Shows logging thread ID.
sid
Shows client session ID in context of which this log message is printed.
txid
Shows transaction ID in context of which this log message is printed.
qid
Shows X100 query ID (within a session) in context of which this log message is printed.
flush
(Recommended) Flushes log file after each write.
color
Displays colored logs (yellow WARNs and red ERRORs) on STDERR/STDOUT. Can be used only on black background terminals.
usec
Provides 6-digit usec information to both timestamp and timesec.
The order in which options are specified does not influence the format in which the corresponding fragments of the log lines are printed. Only one of timestamp or timesec can be in effect.
Example:
file = pid:tid:sid:txid:flush:timestamp:showlevel
Facility Configuration
The syntax for specifying logging options for the default or specific facility is as follows:
facility_name=facility_config
facility_name
Specifies the name of the facility. Possible names include:
default
Specifies the configuration for all facilities that have no configuration specified, and for single unspecified options. Default configuration must be specified before any other facilities in the configuration file.
CBM
(Recommended) Sets log configuration for buffer manager facility. If set to info, general information about the size of the memory buffers and columnspace is included in the log file on startup.
WAL_CONDENSATION
Sets log configuration for the WAL condensation facility. If set to info, information about the performed WAL condensation operations is included in the log.
MEMCONTEXT
Sets log configuration for memory management facility. If set to info, a dump of memory allocation details is printed in case of out of memory (OOM) errors, and general system memory statistics are printed with every query.
NETBUFFER
Sets log configuration for the netbuffer facility.
QUERYERROR
Sets log configuration for query error facility. If set to info, failed queries print the query text, the error message, and in case of OOM errors, memory allocation details for easier debugging.
SCHEDULER
Sets log configuration for query scheduler. If set to info, information about system load and cores granted to queries is printed with every query.
SYSCALL
Sets log configuration for SYSCALL facility. If set to info, information about execution of some system calls (rewrite, checkpoint, write_lock, profile_memcontext) is included in the log.
SYSTEM
(Recommended) Sets log configuration for System facility. If set to info, the server version and other identifying information is included in the log.
UPDATE_MGR
Sets log configuration for transaction management. If set to info, information about starting and ending transactions is included.
UPDATE_PROPAGATION
Sets log configuration for the update propagation facility. If set to info, information about the performed log condensation operations is included in the log.
X100SERVER
Sets log configuration for server queries. If set to info, information about starting and ending sessions and queries is included.
facility_config
Specifies the configuration line for the specified facility. Consists of one or more of the following options separated by colons (:):
error, warn, info, debug
Sets minimum level of displayed messages.
file
Logs messages for this facility to given output streams. Only "file" is supported.
Example:
default = warn:file
SYSTEM = info:file
SYSCALL = info:file
CBM = info:file
QUERYERROR = info:file
Example X100 Error Log Configurations
1. The following configuration:
default=info:file
filename=/home/vectorwise/vectorwise.log
file=pid:timestamp:showlevel:flush
Sets the log level to INFO.
Changes the location of the log file from its default location to home/vectorwise.
Shows the process ID, ISO timestamp, and the log level in each log record.
Flushes the log file after each write.
2. The following configuration:
default=warn:file
filename=/tmp/vw.log
file=color:timestamp:showlevel:flush
facility NETBUFFER=cyan
Writes output to the file /tmp/vw.log.
Shows the ISO timestamp and log level, and flushes the log file after each write.
Shows messages issued by the NETBUFFER facility in cyan.
3. The following configuration:
default=warn:file
file=timestamp:showlevel:pid:txid
QUERYERROR=info:file
Shows the ISO timestamp, log level, process ID, and transaction ID in each log record.
Shows information about failed queries by raising the log level of the QUERYERROR facility to INFO.
VWLOG Environment Variable--Configure Error Reporting
Instead of creating an error log configuration file, you can configure X100 logging by specifying the VWLOG environment variable before Vector is started.
The following results in INFO-level logging that is written to the file /tmp/vectorwise.log:
Linux:
export VWLOG="default=info:file,filename=/tmp/vectorwise.log,file=timestamp:showlevel:flush:pid"
Windows:
SET VWLOG="default=info:file,filename=C:\temp\vectorwise.log,file=timestamp:showlevel:flush:pid"
Rotating the X100 Error Log
If the error log gets too large, the VWLOG_ROTATE system call can be used to close the current error log file, move it to a new file, and then reopen the old error log file (which is now empty) and continue to append incoming log messages.
For example: The following statement moves the error log file to archive1.log. Subsequent log lines are written to a new, empty file that has the same name as the old log file:
CALL X100(VWLOG_ROTATE '''/opt/Actian/VectorXX/ingres/files/archive1.log''');
For more information, see VWLOG_ROTATE in the SQL Language Guide.
Changing Error Log Configuration Settings Dynamically
Error logging configuration can be changed dynamically, for example, if you want to increase the logging level while debugging a process. The VWLOG_RELOAD system call loads a specific X100 error log configuration file, whose rules are used for all subsequent log events. Restarting Vector is not necessary.
For example, the following statement tells Vector to immediately start using the specified log configuration file:
CALL X100(VWLOG_RELOAD '''C:\\Program Files\\Actian\\VectorVW\\ingres\\files\\vwlog.conf''');
For more information, see VWLOG_RELOAD in the SQL Language Guide.
Last modified date: 03/21/2024