Main Content

linux.LogMessages.get

Filter and get log messages

Since R2022b

    Description

    example

    get(logObj) returns the log messages from the log object logObj filtered based on application Id appIdFilter, context Id ctxIdFilter, severity level severityFilter, and containing the text messageFilter.

    Examples

    collapse all

    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

    collapse all

    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.

    Filter the log messages by a string. Specify the string you want to see in the log messages.

    Example: MessageFilter="User Defined Binding"

    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'

    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'

    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:

    1. Fatal

    2. Error

    3. Warn

    4. Info

    5. Debug

    6. Verbose

    Example: SeverityFilter='Error'

    Version History

    Introduced in R2022b