You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current "log" server module function was defined with
a void return. This contrasts with most of the other module
functions which characteristically return a pmix_status_t,
thereby supporting a return status that indicates if the
function is not supported or has been atomically completed.
Add a replacement "log2" function that is identical in signature
except for returning a pmix_status_t instead of void. Deprecate
the current "log" function.
Signed-off-by: Ralph Castain <[email protected]>
Provide better description for PMIx_Log arguments
Expand on the use of the "data" vs "directives" attribute
arrays, providing a couple of examples to help clarify
their use.
Signed-off-by: Ralph Castain <[email protected]>
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{info} array:
889
+
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{directives} array:
890
890
891
891
\pasteAttributeItem{PMIX_USERID}
892
892
\pasteAttributeItem{PMIX_GRPID}
893
893
894
-
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes:
894
+
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes when provided as part of the \refarg{data} array:
895
895
896
896
\pasteAttributeItem{PMIX_LOG_STDERR}
897
897
\pasteAttributeItem{PMIX_LOG_STDOUT}
898
898
\pasteAttributeItem{PMIX_LOG_SYSLOG}
899
-
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
900
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
899
+
900
+
Similarly, the following attributes must be supported when provided as part of the \refarg{directives} array:
901
+
901
902
\pasteAttributeItem{PMIX_LOG_SYSLOG_PRI}
902
903
\pasteAttributeItem{PMIX_LOG_ONCE}
903
904
904
905
\reqattrend
905
906
906
907
\optattrstart
907
-
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation:
908
+
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation when provided as part of the \refarg{data} array:
909
+
910
+
\pasteAttributeItem{PMIX_LOG_EMAIL}
911
+
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
912
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
913
+
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
914
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
915
+
916
+
Similarly, the following attributes are optional when provided as part of the \refarg{directives} array:
908
917
909
918
\pasteAttributeItem{PMIX_LOG_SOURCE}
910
919
\pasteAttributeItem{PMIX_LOG_TIMESTAMP}
911
920
\pasteAttributeItem{PMIX_LOG_GENERATE_TIMESTAMP}
912
921
\pasteAttributeItem{PMIX_LOG_TAG_OUTPUT}
913
922
\pasteAttributeItem{PMIX_LOG_TIMESTAMP_OUTPUT}
914
923
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
915
-
\pasteAttributeItem{PMIX_LOG_EMAIL}
916
-
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
917
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
918
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
919
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
920
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
921
-
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
922
-
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
923
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
924
+
924
925
925
926
\optattrend
926
927
927
928
%%%%
928
929
\descr
929
930
930
-
Log data subject to the services offered by the host environment. The data to be logged is provided in the \refarg{data} array. The (optional) \refarg{directives} can be used to direct the choice of logging channel.
931
+
Log data subject to the services offered by the host environment. The \refarg{data} array is used to specify the information that is to be logged, while the \refarg{directives} array is used to control formatting and other output options. For example, a user can:
932
+
933
+
\begin{itemize}
934
+
\item log a message to \code{stderr} by including \refattr{PMIX_LOG_STDERR} in the \refarg{data} array, with the message itself provided as a string value in that \refstruct{pmix_info_t} element. They can also have that message time-stamped by including the \refattr{PMIX_LOG_TIMESTAMP} attribute in the \refarg{directives} array.
935
+
\item send an email to one or more recipients by including \refattr{PMIX_LOG_EMAIL} in the \refarg{data} array, with the \refstruct{pmix_data_array_t} value containing the message, recipient, and any required server information. Note that any \refarg{directives} (e.g., \refattr{PMIX_LOG_GENERATE_TIMESTAMP}) will be applied to the email request.
936
+
\item log a message to the syslog on the system console by including \refattr{PMIX_LOG_GLOBAL_SYSLOG} in the \refarg{data} array, with the message itself provided as a string value in that \refstruct{pmix_info_t} element. The syslog priority could be set with \refattr{PMIX_LOG_SYSLOG_PRI} in the \refarg{directives} array.
937
+
\end{itemize}
938
+
939
+
Note that it is possible to log multiple messages to different channels using a single call to \refapi{PMIx_Log}. For instance, the above examples could be combined into a single call to \refapi{PMIx_Log}. In this case, only directives that are applicable to a channel will be used in outputting to that channel. For this example, a directive such as \refattr{PMIX_LOG_TIMESTAMP} would cause all three messages to be time-stamped, but a \refattr{PMIX_LOG_SYSLOG_PRI} directive would only be applied to the syslog channel.
940
+
941
+
Multiple instances of the same attribute can be included in the \refarg{data} array - e.g., to send different emails to various recipients.
931
942
932
943
\adviceuserstart
933
944
It is strongly recommended that the \refapi{PMIx_Log} API not be used by applications for streaming data as it is not a ``performant'' transport and can perturb the application since it involves the local \ac{PMIx} server and host \ac{SMS} daemon. Note that a return of \refconst{PMIX_SUCCESS} only denotes that the data was successfully handed to the appropriate system call (for local channels) or the host environment and does not indicate receipt at the final destination.
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{info} array:
987
+
If the \ac{PMIx} library does not itself perform this operation, then it is required to pass any attributes provided by the client to the host environment for processing. In addition, it must include the following attributes in the passed \refarg{directives} array:
977
988
978
989
\pasteAttributeItem{PMIX_USERID}
979
990
\pasteAttributeItem{PMIX_GRPID}
980
991
981
-
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes:
992
+
Host environments or \ac{PMIx} libraries that implement support for this operation are required to support the following attributes when provided as part of the \refarg{data} array:
982
993
983
994
\pasteAttributeItem{PMIX_LOG_STDERR}
984
995
\pasteAttributeItem{PMIX_LOG_STDOUT}
985
996
\pasteAttributeItem{PMIX_LOG_SYSLOG}
986
-
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
987
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
997
+
998
+
Similarly, the following attributes must be supported when provided as part of the \refarg{directives} array:
999
+
988
1000
\pasteAttributeItem{PMIX_LOG_SYSLOG_PRI}
989
1001
\pasteAttributeItem{PMIX_LOG_ONCE}
990
1002
991
1003
\reqattrend
992
1004
993
1005
\optattrstart
994
-
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation:
1006
+
The following attributes are optional for host environments or \ac{PMIx} libraries that support this operation when provided as part of the \refarg{data} array:
1007
+
1008
+
\pasteAttributeItem{PMIX_LOG_EMAIL}
1009
+
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
1010
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
1011
+
\pasteAttributeItem{PMIX_LOG_LOCAL_SYSLOG}
1012
+
\pasteAttributeItem{PMIX_LOG_GLOBAL_SYSLOG}
1013
+
1014
+
Similarly, the following attributes are optional when provided as part of the \refarg{directives} array:
995
1015
996
1016
\pasteAttributeItem{PMIX_LOG_SOURCE}
997
1017
\pasteAttributeItem{PMIX_LOG_TIMESTAMP}
998
1018
\pasteAttributeItem{PMIX_LOG_GENERATE_TIMESTAMP}
999
1019
\pasteAttributeItem{PMIX_LOG_TAG_OUTPUT}
1000
1020
\pasteAttributeItem{PMIX_LOG_TIMESTAMP_OUTPUT}
1001
1021
\pasteAttributeItem{PMIX_LOG_XML_OUTPUT}
1002
-
\pasteAttributeItem{PMIX_LOG_EMAIL}
1003
-
\pasteAttributeItem{PMIX_LOG_EMAIL_ADDR}
1004
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SENDER_ADDR}
1005
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SERVER}
1006
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SRVR_PORT}
1007
-
\pasteAttributeItem{PMIX_LOG_EMAIL_SUBJECT}
1008
-
\pasteAttributeItem{PMIX_LOG_EMAIL_MSG}
1009
-
\pasteAttributeItem{PMIX_LOG_JOB_RECORD}
1010
-
\pasteAttributeItem{PMIX_LOG_GLOBAL_DATASTORE}
1022
+
1011
1023
1012
1024
\optattrend
1013
1025
1014
1026
%%%%
1015
1027
\descr
1016
1028
1017
-
Log data subject to the services offered by the host environment. The data to be logged is provided in the \refarg{data} array. The (optional) \refarg{directives} can be used to direct the choice of logging channel.
1018
-
The callback function will be executed when the log operation has been completed. The \refarg{data} and \refarg{directives} arrays must be maintained until the callback is provided.
1029
+
Log data subject to the services offered by the host environment. See the description in \refapi{PMIx_Log} for details on use of the \refarg{data} and \refarg{directives} arrays.
1019
1030
1020
1031
\adviceuserstart
1021
1032
It is strongly recommended that the \refapi{PMIx_Log_nb} API not be used by applications for streaming data as it is not a ``performant'' transport and can perturb the application since it involves the local \ac{PMIx} server and host \ac{SMS} daemon. Note that a return of \refconst{PMIX_SUCCESS} only denotes that the data was successfully handed to the appropriate system call (for local channels) or the host environment and does not indicate receipt at the final destination.
0 commit comments