linux.LogMessages.get
Syntax
Description
Examples
Filter the Log Messages
Create a log object with name log_Obj_Target1
for
the Target1
.
log_Obj_Target1 = linux.LogMessages('Target1');
From the log_Obj_Target1
, view the messages related to the
application Linux Application1
.
get(log_Obj_Target1, AppIdFilter='Linux_Application1')
From the log_Obj_Target1
, view the messages with severity level
Warn
and related to the application Linux
Application2
.
get(log_Obj_Target1, AppIdFilter='Linux_Application1', SeverityFilter='Warn')
Input Arguments
logObj
— object containing the log messages
object
Specify the object containing logs of a target. The logObj
can be
created by using the linux.LogMessages
function.
Example: log_Object1
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: get(logObj
,
AppIdFilter
='Linux_application1', CtxIdFilter
='Linux
application', SeverityFilter
='Warn') returns the log messages related to
the Linux_application1
, Linux application
context, and
with severity Warn
and above from the
logObj
.
MessageFilter
— Filter by message text
char vector | string
Filter the log messages by a string. Specify the string you want to see in the log messages.
Example: MessageFilter
="User Defined Binding"
AppIdFilter
— Filter by application id
char vector | string
Filter the log messages by unique application identifier. Specify the application id to see the log messages related to that application.
Example: AppIdFilter
='Linux_Application1'
CtxIdFilter
— Filter by message context
char vector | string
Filter the log messages by context identifier. Specify the context id to see in
the log messages. Context id can be same in multiple applications. To view log
messages of specific context from a specific application, use both
AppIdFilter
and CtxIdFilter
.
Example: CtxIdFilter
='Linux App'
Example: AppIdFilter
='Linux_Application1',CtxIdFilter
='Linux
App'
SeverityFilter
— Filter by severity level
char vector | string
Filter the log messages by the level of severity. Specify the severity level to view the messages with specified severity and above. The order of the severity is as follows:
Fatal
Error
Warn
Info
Debug
Verbose
Example: SeverityFilter
='Error'
Version History
Introduced in R2022b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)