NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXTENDED DESCRIPTION | ATTRIBUTES | SEE ALSO
chlog is a host utility.
The chlog is the ChorusOS DebugServer logging tool. The tool has two basic functionalities:
First, it configures the logging mechanism of the DebugServer.
Second, it reports the log messages produced by the DebugServer.
Each log message is characterized by the following identifiers:
A log level identifier n
A log component identifier component
A log message identifier. This is a unique number which identifies the log message. It is allocated for each log message.
The following options are supported:
Configures the logging mechanism of the DebugServer. n indicates the level of log messages for the components that are listed. A log level of 0 turns off the production of log messages. High values produce more log messages. The highest log level value which is valid is 5. The list of components can be obtained by using the -list-level option.
Prints the list of the DebugServer components and indicates the log levels for each of them.
Causes the chlog tool to operate in a mode in which it continuously reports the log messages produced by the DebugServer. While log messages are being reported, the log levels may be changed in another window. Press ^C to stop the continuous report.
The log component identifier component is a unique identifier which represents the component (software part) that has produced the log message. This identifier is used to organize the log message and to provide a simple and efficient filter mechanism. The following components identifiers are available:
Component Id |
Name |
Description |
---|---|---|
1 |
rpc |
This component represents the server RPC part of the DebugServer front-end. Activation of logs of this component helps to understand the invocations to the DebugServer. |
2 |
frontend |
This component represents the DebugServer front-end. |
3 |
backend |
This component represents the DebugServer back-end. |
4 |
core |
This component represents the DebugServer core back-end. |
5 |
serial |
This component represents the DebugServer serial line back-end. |
6 | errors | This component represents all the errors raised by the DebugServer. |
7 |
console |
This component represents the debug console. |
8 |
serial-device |
This component represents the serial device. Activating the messages of this component will display the data passed on the serial line. |
The log level identifier n is a number which indicates the degree of verbosity of the log message. It is used to filter messages which are produced very often from others. Several log levels are pre-defined (first is lowest, last is highest):
Log messages are disabled.
Log messages produced at initialization only.
Log messages to indicate the basic activity. Such log message should only be produced to indicate that the component is entered (called) or left (exit).
First level of debugging. These log messages provide more information about the behavior and the execution of the component.
Second level of debugging to produce more information. This log message gives hexadecimal dump of area of memory which is read or written.
Highly detailed messages.
Configuring the log means defining the log levels for the components of the DebugServer. The following command:
chlog -level n component...
allows to set the log level of a set of components. The log levels are described in the previous section. A value of 0 disables the log for the given components. High log levels produce more messages. The set of components is specified as a set of strings, each of them refering to a specific component.
The list of components and the current configuration of log levels can be obtained using the command:
chlog -list-level
The log levels can be changed while the DebugServer is running.
You can display the log messages with the following command:
chlog -report
This command continuously displays the log messages produced by the DebugServer. The log levels may be changed while the report is in progress. To stop the report, hit ^C or kill the chlog process.
... L851:1:2:T57:start 'get_objects' L852:1:2:T57:'get_objects' done L853:1:2:T57:start 'list_objects' L854:3:2:T57:Read 4 bytes memId ffffffff at 0x00000017 L855:3:3:T57:Read result 0 ... L1056:1:2:T57:'list_objects' done L1063:1:2:T58:start 'list_objects' L1064:6:2:T58:Error 2: Browsing operation 'scan_threads' not recognized L1065:1:2:T58:'list_objects' raised an exception L1066:1:3:T58:Code: 2 Msg: Browsing operation 'scan_threads' not recognized
These log messages must be interpreted as follows:
Log Id |
Component Id |
Log Level |
Thread |
Message |
---|---|---|---|---|
L851 |
1 |
2 |
T57 |
start 'get_objects' |
L852 |
1 |
2 |
T57 |
'get_objects' done |
L853 |
1 |
2 |
T57 |
start 'list_objects' |
L854 |
3 |
2 |
T57 |
Read 4 bytes memId... |
... |
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXTENDED DESCRIPTION | ATTRIBUTES | SEE ALSO