ntlog
The ntlog tool is used to read the log generated by the driver and is used mainly for debugging purposes.
- Note
- For more information about logging see Logging.
Syntax
ntlog [-m <mask> -s <mask> -l <message> -h]
Command | Description |
---|---|
-h, --help | Show help and exit |
-m <mask> | Bitmask that specifies the level of log information to show in the log dump
|
-s <mask> | Bitmask that specifies the level of log information to record. The initial bitmask is defined in the ntservice.ini file (see below), but it can be temporarily changed by this command. Changes to the initial bitmask has effect until next time the service is (re)started. Note: Using this option it is possible to completely disable all logging temporarily.
|
-l, --logmsg <message> | Log a message to the ntservice log system. The message is logged at the INFO log level. |
If no command is specified, it defaults to ntlog -m 0xff
.
Examples
ntlog -m 0x1ff
Dump all log information to the screen.ntlog -m 0x1ff > log.log
Dump all log information to thelog.log
file.ntlog -s 0xff
Temporarily enable all log information.ntlog -s 0x00
Temporarily disable all logging
Note: AVR logging cannot be disabled.ntlog -l "Some use full message"
Writes a message to the ntservice log system.
- Note
- For information about how to setup logging in the ini-file see Logging.
Log Output Format
The output from the log file has the following format:
-------------------------+--------+---------+-----+------------+------------------------------------------------------------------ Timestamp | PID | LogType | Src | Rel | Log entry -------------------------+--------+---------+-----+------------+------------------------------------------------------------------ 10/23/14 15:42:26.175000 | 32028 | INFO | SRV | 525-f8f4a | ******************************************************************** 10/23/14 15:42:26.175000 | 32028 | INFO | SRV | 525-f8f4a | * NTService is now operational. * 10/23/14 15:42:26.177000 | 32028 | INFO | SRV | 525-f8f4a | ********************************************************************
where:
- Column 1: Timestamp - date and time
The date and time when the log is written - Column 2: PID - Process ID
The process ID of the process issuing the log - Column 3: LogType - log type
The log types available are:- ERROR:
A severe error has occured - the system is not able to continue - WARNING:
A less severe has occured - the system is able to continue - INFO:
Information about adapters and settings, etc. - DEBUG:
Internal - information used for debugging - EVENT:
Internal - event sent from NTService, mainly used for debugging. When an event is sent the event is logged, if enabled. Enabling this log type can result in a huge amount of data. - COMMAND:
Internal - Commands received by NTService, mainly used for debugging. When a command is received the command is logged, if enabled. Enabling this log type can result in a huge amount of data. - API:
Internal - API functions called, mainly used for debugging. When any API function is called it results in one or more logs, if enabled. Enabling this log type can result in a huge amount of data. - DIAG:
Internal - Diagnostic messages, mainly used for debugging - AVR:
Internal - Hardware logs, mainly used for debugging. Log messages from the hardware.
- ERROR:
- Column 4: Src - log source
The log sources available are:- OSS:
LibNTOS - logs from the OS abstraction layer library - API
LibNTAPI - logs from the API library - SRV
NTService - logs from the ntservice deamon - APP
APP - logs from an application - DRV
Kernel - logs from the kernel mode driver.
- OSS:
- Column 5: Rel - Release build ID
The release build ID of the running software/firmware version- OSS:
LibNTOS - logs from the OS abstraction layer library
- OSS:
- Column 6: Log entry - log message
This is the log message which will always start with the build number. The build number is used to identify the release used by the customer. The log message can span multiple lines.
The log message shown is available when the service is up and running and ready to receive connections.