How it Works

This section describes how this feature works.

Log Instances

The log instance generates messages, used for identifying issues, deployment status, and performance tuning. The application infrastructure provides a common way to enable log messages across applications. Each log instance has the following:

  • Timestamp

  • Log message

  • Log level

  • LogTag

LogTag

The LogTag is used as a filter to enable or disable the specific type of log messages. Before or during the logging session, they are precreated, evaluated, and exempted. It consists of the following:

  • Module name

  • Component name

  • Interface name

Creating a LogTag

The following is a sample example of creating a LogTag:

common.LogTagN7RestEp = appCtx.RegisterLogTag("rest_ep", "app", "n7")

Logging a Message

The following is a sample example of a LogTag message logging:

appCtx.Info(common.LogTagN7RestEp, "Starting rest-ep app")

Log Levels

The application infrastructure provides upto six variants of log levels, which can be used as filter along with LogTag to enable or disable specific logs. Each level represents the level of importance of a log message, which can be used while troubleshooting. The following table lists log levels and their usage:

Log Levels

Log Levels

Usage

Error

Used when there’s incorrectness leading to serious issues.

Warning

Used to notify and warn, when there’s an occurrence of any of the following scenarios:

  • Something serious is about to happen.

  • If there’s an activity which is erroneously running

  • Continuously giving error notes

  • Not attended scenarios

Info

Used for normal expected behavior such as starting an application or stopping the same, and so on.

Debug

Used to provide more information required to debug problems.

Trace

Used to provide extensive information. Also, used in monitoring routines, where the same debug log keeps coming periodically.

Off

Used when there isn't any meaning in the logging information. Configured in the CLI to turn off or turn on the logging activity.

Log Level Order

Every time, the application infrastructure logs any log message, it matches the log level, and the LogTag with the configured log setting, before logging.

Log Levels

Log Levels (Order)

Usage

Error (0)

Matches error logs.

Warn (1)

Matches warn and error logs.

Info (2)

Matches info, warn, and error logs.

Debug (3)

Matches debug, info, warn, and error logs.

Trace (4)

Matches trace, debug, info, warn, and error logs.

Off (5)

Matches no log to disable errors.

SMF Logs

The SMF supports operators to enable specific LogTag. The following is a list of modules which support the implementation of this feature.

  1. Call Failure LogTag:

    • Enabled in the CLI mode

    • The SMF must enable the following logs based on the disconnect reason:

      • Error

      • Warning

      • Debug

    • It prints the following log parameters:

      • Transaction ID

      • Disconnect reason

      • Event Trace

      • Session Keys

      • Error Category (For major disconnect reason)

  2. Procedure Failure LogTag:

    • Enabled in the CLI mode

    • The SMF must enable the following logs based on the disconnect reason:

      • Warning

    • It prints the following log parameters:

      • Transaction ID

      • Procedure Name

      • Event Trace

      • Detailed Error: It includes the following:

        • Failure reason or cause

        • Disconnect reason (if applicable)

        • Failure metrics

  3. Additional Call Flow Failure LogTag:

    • Enabled for specific reasons or conditions

    • It prints the following log parameters:

      • Transaction ID

      • Event Trace

      • Call flow-specific error messages

    • The supported log levels:

      • Error

      • Warning

      • Info

      • Debug

  4. Additional Generic Procedure Failure LogTag:

    • Enabled in the CLI mode

    • The SMF must not enable the Event Trace based on the disconnect reason.

    • If the operator needs failure logs for all procedures, then the operator can enable this LogTag.

      Note

      The operator needs to activate this LogTag carefully, as it prints logs of all failed procedures. This action can cause an overflow of service logs.

    • It prints the following log parameters:

      • Transaction ID

      • Procedure Name

      • Detailed Error: It includes the following:

        • Failure reason or cause

        • Disconnect reason (if applicable)

        • Failure metrics

  5. Call Flow Statistics LogTag:

    • This process gets tabulated at the end of all procedures.

  6. Core Dump LogTag:

    • This process initiates the debugging activities for a core dump utility.

  7. Subscriber Monitoring LogTag:

    • This process initiates the debugging activities for any kind of failures. It also processes the subscriber monitoring based on the subscriber SUPI.

Timesaver

For more information, see Troubleshooting Information > Logs.