-.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
+.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.\" ========================================================================
.\"
.IX Title "swtpm 8"
-.TH swtpm 8 "2017-01-13" "swtpm" ""
+.TH swtpm 8 "2017-01-23" "swtpm" ""
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.IP "\fB\-\-tpmstate dir=<dir>\fR" 4
.IX Item "--tpmstate dir=<dir>"
Use the given path rather than using the environment variable \s-1TPM_PATH.\s0
-.IP "\fB\-\-log fd=<fd>|file=<path>\fR" 4
-.IX Item "--log fd=<fd>|file=<path>"
+.IP "\fB\-\-log [fd=<fd>|file=<path>\fR][,level=n]" 4
+.IX Item "--log [fd=<fd>|file=<path>][,level=n]"
Enable logging to a file given its file descriptor or its path. Use '\-' for path to
suppress the logging.
+.Sp
+The level parameter allows to choose the level of logging. Starting at log
+level 5, libtpms debug logging is activated.
.IP "\fB\-\-key file=<keyfile>[,format=<hex|binary>][,mode=aes\-cbc],[remove[=true|false]]\fR" 4
.IX Item "--key file=<keyfile>[,format=<hex|binary>][,mode=aes-cbc],[remove[=true|false]]"
Enable encryption of the state files of the \s-1TPM.\s0 The keyfile must contain
Use the given path rather than using the environment variable TPM_PATH.
-=item B<--log fd=E<lt>fdE<gt>|file=E<lt>pathE<gt>>
+=item B<--log [fd=E<lt>fdE<gt>|file=E<lt>pathE<gt>>][,level=n]
Enable logging to a file given its file descriptor or its path. Use '-' for path to
suppress the logging.
+The level parameter allows to choose the level of logging. Starting at log
+level 5, libtpms debug logging is activated.
+
=item B<--key file=E<lt>keyfileE<gt>[,format=E<lt>hex|binaryE<gt>][,mode=aes-cbc],[remove[=true|false]]>
Enable encryption of the state files of the TPM. The keyfile must contain
}, {
.name = "fd",
.type = OPT_TYPE_INT,
+ }, {
+ .name = "level",
+ .type = OPT_TYPE_UINT,
},
END_OPTION_DESC
};
char *error = NULL;
const char *logfile = NULL;
int logfd;
+ unsigned int loglevel;
OptionValues *ovs = NULL;
if (!options)
}
logfile = option_get_string(ovs, "file", NULL);
logfd = option_get_int(ovs, "fd", -1);
+ loglevel = option_get_uint(ovs, "level", 0);
if (logfile && (log_init(logfile) < 0)) {
fprintf(stderr,
"Could not open logfile for writing: %s\n",
logfd, strerror(errno));
goto error;
}
+ log_set_level(loglevel);
option_values_free(ovs);
" be given in case the type is TCP; the TCP socket is bound\n"
" to 127.0.0.1 by default and other bind addresses can be\n"
" given with the bindaddr parameter\n"
- "--log file=<path>|fd=<filedescriptor>\n"
+ "--log file=<path>|fd=<filedescriptor>[,level=n]\n"
" : write the TPM's log into the given file rather than\n"
" to the console; provide '-' for path to avoid logging\n"
+ " log level 5 and higher will enable libtpms logging\n"
"--key file=<path>[,mode=aes-cbc][,format=hex|binary][,remove=[true|false]]\n"
" : use an AES key for the encryption of the TPM's state\n"
" files; use the given mode for the block encryption;\n"
" be given in case the type is TCP; the TCP socket is bound\n"
" to 127.0.0.1 by default and other bind addresses can be\n"
" given with the bindaddr parameter\n"
- "--log file=<path>|fd=<filedescriptor>\n"
+ "--log file=<path>|fd=<filedescriptor>[,level=n]\n"
" : write the TPM's log into the given file rather than\n"
" to the console; provide '-' for path to avoid logging\n"
+ " log level 5 and higher will enable libtpms logging\n"
"--key file=<path>[,mode=aes-cbc][,format=hex|binary][,remove=[true|false]]\n"
" : use an AES key for the encryption of the TPM's state\n"
" files; use the given mode for the block encryption;\n"