Skip to content

Commit

Permalink
Add "--enable-rfc5424time-secs" configure parameter
Browse files Browse the repository at this point in the history
Add milliseconds to default log message header with the (default)
RFC5424 time format. Disable milliseconds logging using the configure
parameter "--enable-rfc5424time-secs". Sample time stamp format is as
follows: "2013-03-13T14:28:17.767-07:00".
  • Loading branch information
jette committed Mar 13, 2013
1 parent a36b680 commit 00c46ce
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ documents those changes that are of interest to users and admins.

* Changes in Slurm 2.6.0pre3
============================
-- Add milliseconds to default log message header with the (default)
RFC5424 time format. Disable milliseconds logging using the configure
parameter "--enable-rfc5424time-secs". Sample time stamp format is as
follows: "2013-03-13T14:28:17.767-07:00".

* Changes in Slurm 2.6.0pre2
============================
Expand Down
4 changes: 4 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ OTHER CHANGES
- Added SLURM_SUBMIT_HOST to salloc, sbatch and srun job environment.
- Added SLURM_ARRAY_TASK_ID and SLURM_ARRAY_TASK_ID to environment of job
array.
- Added milliseconds to default log message header with the (default)
RFC5424 time format. Disable milliseconds logging using the configure
parameter "--enable-rfc5424time-secs". Sample time stamp format is as
follows: "2013-03-13T14:28:17.767-07:00".

API CHANGES
===========
Expand Down
23 changes: 23 additions & 0 deletions auxdir/x_ac_rfc5424_time.m4
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,28 @@ AC_DEFUN([X_AC_RFC5424_TIME], [
else
AC_MSG_RESULT([no])
fi
if test "$x_ac_rfc5424time" = yes; then
AC_MSG_CHECKING([resolution of RFC 5424 time to the second])
AC_ARG_ENABLE(
[rfc5424time-secs],
AS_HELP_STRING(--enable-rfc5424time-secs, record RFC 5424 time to second resolution),
[ case "$enableval" in
yes) x_ac_rfc5424time_secs=yes ;;
no) x_ac_rfc5424time_secs=no ;;
*) AC_MSG_RESULT([doh!])
AC_MSG_ERROR([bad value "$enableval" for --enable-rfc5424time-secs]) ;;
esac
],
[x_ac_rfc5424time_secs=no]
)
if test "$x_ac_rfc5424time_secs" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(USE_RFC5424_TIME_SECS,,[RFC 5424 time format to second resolution])
else
AC_MSG_RESULT([no])
fi
fi
])

3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@
/* define if using RFC 5424 time format */
#undef USE_RFC5424_TIME

/* RFC 5424 time format to second resolution */
#undef USE_RFC5424_TIME_SECS

/* Version number of package */
#undef VERSION

Expand Down
34 changes: 34 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ with_cpusetdir
enable_pam
with_pam_dir
enable_rfc5424time
enable_rfc5424time_secs
enable_iso8601
enable_load_env_no_login
enable_sun_const
Expand Down Expand Up @@ -1630,6 +1631,8 @@ Optional Features:
--enable-pam enable PAM (Pluggable Authentication Modules)
support
--disable-rfc5424time disable RFC 5424 time format support
--enable-rfc5424time-secs
record RFC 5424 time to second resolution
--disable-iso8601 disable ISO 8601 time format support
--enable-load-env-no-login
enable --get-user-env option to load user
Expand Down Expand Up @@ -18769,6 +18772,37 @@ $as_echo "#define USE_RFC5424_TIME /**/" >>confdefs.h
$as_echo "no" >&6; }
fi

if test "$x_ac_rfc5424time" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking resolution of RFC 5424 time to the second" >&5
$as_echo_n "checking resolution of RFC 5424 time to the second... " >&6; }
# Check whether --enable-rfc5424time-secs was given.
if test "${enable_rfc5424time_secs+set}" = set; then :
enableval=$enable_rfc5424time_secs; case "$enableval" in
yes) x_ac_rfc5424time_secs=yes ;;
no) x_ac_rfc5424time_secs=no ;;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: doh!" >&5
$as_echo "doh!" >&6; }
as_fn_error $? "bad value \"$enableval\" for --enable-rfc5424time-secs" "$LINENO" 5 ;;
esac

else
x_ac_rfc5424time_secs=no

fi


if test "$x_ac_rfc5424time_secs" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

$as_echo "#define USE_RFC5424_TIME_SECS /**/" >>confdefs.h

else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ISO 8601 time format support" >&5
Expand Down
11 changes: 8 additions & 3 deletions src/plugins/slurmctld/dynalloc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,16 @@ LTLIBRARIES = $(pkglib_LTLIBRARIES)
slurmctld_dynalloc_la_LIBADD =
am__slurmctld_dynalloc_la_SOURCES_DIST = allocate.c allocate.h \
allocator.c allocator.h argv.c argv.h deallocate.c \
deallocate.h info.c info.h msg.c msg.h slurmctld_dynalloc.c
deallocate.h info.c info.h job_ports_list.c job_ports_list.h \
msg.c msg.h slurmctld_dynalloc.c
am__objects_1 = allocate.lo allocator.lo argv.lo deallocate.lo info.lo \
msg.lo slurmctld_dynalloc.lo
job_ports_list.lo msg.lo slurmctld_dynalloc.lo
@SLURM_ENABLE_DYNAMIC_ALLOCATION_TRUE@am_slurmctld_dynalloc_la_OBJECTS = \
@SLURM_ENABLE_DYNAMIC_ALLOCATION_TRUE@ $(am__objects_1)
am__EXTRA_slurmctld_dynalloc_la_SOURCES_DIST = allocate.c allocate.h \
allocator.c allocator.h argv.c argv.h deallocate.c \
deallocate.h info.c info.h msg.c msg.h slurmctld_dynalloc.c
deallocate.h info.c info.h job_ports_list.c job_ports_list.h \
msg.c msg.h slurmctld_dynalloc.c
slurmctld_dynalloc_la_OBJECTS = $(am_slurmctld_dynalloc_la_OBJECTS)
slurmctld_dynalloc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
Expand Down Expand Up @@ -399,6 +401,8 @@ AS_DYNALLOC_SOURCES = \
deallocate.h \
info.c \
info.h \
job_ports_list.c \
job_ports_list.h \
msg.c \
msg.h \
slurmctld_dynalloc.c
Expand Down Expand Up @@ -487,6 +491,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deallocate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_ports_list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slurmctld_dynalloc.Plo@am__quote@

Expand Down

0 comments on commit 00c46ce

Please sign in to comment.