{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "create a log of user specified messages",
  "notes": "Test Scripts may log user messages using ns_log_msg () api. Logged messages have a log level associated with it. Log level specifies the verbosity of the message. Messages with higher log level represents higher level of verbosity. At run time, the log messages are enabled by checking appropriate selection on Log Tab of Run Time Settings screen.\nAll possible values for log level are:\nNS_LOG_STD: Mostly the error messages which typically should always be on.\nNS_LOG_EXTENDED: Verbose messages which typically should be on for small test runs.\nNS_LOG_DEBUG: Debug message which typically should be on for debugging purposes.\n\nFormat and the argument(s) following it are same as the format and the arguments taken by printf.\n\nBy default, Standard logs are logged to standard out. All other logs messages are disabled.\nWhen the logging to file option is enabled, messages are logged to TRxxx/logs. xxx is the Test run number. Also, these messages can be viewed only after the completion of the test run.\n",
  "returns": "The ns_log_msg() API returns an integer value that indicates whether the log message was successfully created or not. A value of zero indicates that the message was successfully created, while a value of -1 indicates an error.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003ctr\u003e	\u003cth\u003e Argument \u003c/th\u003e 	\u003cth\u003e Description \u003c/th\u003e \u003c/tr\u003e	\u003ctr\u003e	\u003ctd\u003e Level \u003c/td\u003e  \u003ctd\u003e It is the log level to which the logged message belongs. Possible values of Level are: NS_LOG_STD, NS_LOG_EXTENDED, and NS_LOG_DEBUG. \u003c/td\u003e  \u003c/tr\u003e \u003ctr\u003e  \u003ctd\u003e String With Format \u003c/td\u003e \u003ctd\u003e This is the string variable already defined in string.c file. \u003c/td\u003e   \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e String to Log \u003c/td\u003e  \u003ctd\u003e This is the string message with the format placeholder of above string variable defined in script.c file. \u003c/td\u003e  \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_log_msg",
  "syntax": "int ns_log_msg(int level, char* str_format, char* string_log)",
  "javaSyntax": "",
  "cEx": "flow() \n{\n  char *x = \"Hello\";\n  int retValue;\n  retValue = ns_log_msg(level, \"%s World\", x);\n  Output of above == > Hello World\n}",
  "javaEx": "",
  "insertStrC": "ns_log_msg(int level, char* str_format, char* string_log);",
  "insertStrJava": "",
  "description": "create a log of user specified messages",
  "component": [
  {
      "id": "$1",
      "type": "Dropdown",
      "label": "Log Level",
      "value": "NS_LOG_STD",
      "css": "p-grid p-align-center w-100-p",
      "title": "Select Log Level",
      "placeHolder": "select Log Level",
      "style": "",
      "isDisabled": "",
      "list": [
        {
          "label": "NS_LOG_STD",
          "value": "NS_LOG_STD"
        },
        {
          "label": "NS_LOG_EXTENDED",
          "value": "NS_LOG_EXTENDED"
        },
        {
          "label": "NS_LOG_DEBUG",
          "value": "NS_LOG_DEBUG"
        }
      ],
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
    {
      "id": "$2",
      "type": "TEXT_VAR",
      "label": "String with Format",
      "labelVarCheckbox": "Check if String with Format is a C Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter String with Format",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
      }
    },
    {
      "id": "$3",
      "type": "TEXT_VAR",
      "label": "String to Log",
      "labelVarCheckbox": "Check if String to Log is a C Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter the String to log",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
      }
    },
	{
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter return variable",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z_][a-zA-Z0-9_\u003e]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0
      }
    }
  ]
}
