NAME

      mxlog - log or print a log entry


SYNOPSIS

      mxlog -l [-r result] [-a action] [-o object_type] [-n object_name]
      [-u user] [-s sessionID] [-t transactionID] [-v verbosity] [-m message]
      mxlog -p [-r result] [-a action] [-o object_type] [-n object_name]
      [-u user] [-s sessionID] [-t transactionID] [-v verbosity] [-m message]


DESCRIPTION

      The mxlog command logs an entry to the log file or to standard out.
      The category of the log entry is always set to APPLICATION.

      The first form allows the user to log the indicated entry to the log
      file.

      The second form allows the user to print the log entry to standard
      out.


    Options
      mxlog recognizes the following options:

	   -l		  Log an entry to the log file.	 This will NOT print
			  the entry to stdout. It cannot be used in
			  combination with "-p".

	   -p		  Print a preview of the log entry to standard out.
			  This will NOT log the entry to the log file.	It
			  cannot be used in combination with "-l".

	   -a action	  The action that occured.  Must specify a value if
			  the "-a" option is used. If "-a" is not used, the
			  default value is START.  Valid values include
			  ACTION_NONE (no action, which appears as a "<>"
			  string), ADD, MODIFY, DELETE, RUN, LIST, ENABLE,
			  DISABLE, RESTORE, SAVE, SETUP, UNSETUP, START, and
			  DONE.

	   -m message	  The accompanying message to be logged.  A value
			  must be specified if "-m" is used. This will
			  appear on the line after the log entry in the log
			  file.	 Must be a string value. If it includes
			  spaces, enclose the value in double quotes.

	   -n object_name The name of the object or application that is
			  making the logging call.  A value must be
			  specified if "-n is used.  If "-n" is not used,
			  the default value is NONE (which appears as a "<>"
			  string).  Must be a string value.  If it includes
			  spaces, enclose in double quotes.

	   -o object_type The type of object or application making this
			  logging call. Must specify a value if the "-o"
			  option is used.  If "-o" is not used, the default
			  value is TYPE_NONE.  Valid values include
			  APPLICATION, GUI and TYPE_NONE (no type, which
			  appears as a "<>" string).

	   -r result	  The result of the event that occured.	 Must
			  specify a value if the "-r" option is used. If "-
			  r" is not used, the default value is SUCCESS.
			  Valid values include IN_PROGRESS, SUCCESS,
			  FAILURE, SOME_FAILURES, CANCELED, KILLED and
			  RESULT_NONE (no result, which appears as a "<>"
			  string).

	   -s sessionID	  Session ID in string form.  Must specify a value
			  if the "-s" option is used.  If the "-s" is not
			  used, there is no value for this field.

	   -t transactionID
			  Transaction ID in string form.  Must specify a
			  value if the "-t" option is used.  If the "-t" is
			  not used, there is no value for this field.

	   -u user	  The user that submitted this log entry.  Must
			  specify a value if the "-u" option is used. If "-
			  u" is not used, the default value is the username
			  of the user running the command (usually root).
			  This is typically used to specify the name of the
			  application logging a message rather than the
			  run-as user of the application.

	   -v verbosity	  The level of verbosity of this log entry. Must
			  specify a value if the "-v" option is used. If "-
			  v" is not used, the default value is SUMMARY.
			  Valid values include SUMMARY, DETAIL, VERBOSE,
			  ERROR, WARNING and NOTE.



RETURN VALUE

      mxlog returns one of the following values:

	     0		  Successful completion.
	     1		  Command line syntax error or invalid user.



LIMITS

      Certain columns in the entry will be filled in to default values at
      all times.  This includes the timestamp (set to the current time upon
      creation of the entry) and the Category column (set to APPLICATION).


EXAMPLES

      Fred is logged into SuperApp, which runs as root.	 SuperApp wants to
      log a WARNING message that a configuration file is missing.

	   mxlog -l -v	"WARNING" -o  "APPLICATION" -n	"SuperApp" -u
	    "fred" -m  "/opt/superapp/superapp.config file is missing."

      The output will be as follows:

	   2002-06-24 18:05:26 MDT APP fred START APP SuperApp START SUCCESS
	   WARNING
	   /opt/superapp/superapp.config file is missing.

      Preview a default entry with a simple message.

	   mxlog -p -m	"This is a test"

      The output will be as follows:

	   2002-06-24 18:06:30 MDT APP root START <> NONE START SUCCESS
	   SUMMARY
	   This is a test.



AUTHOR

      mxlog was developed by the Hewlett-Packard Company.