-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC]: add a logging handler callback
Just some code to guide a discussion on how to add a logging callback routine to make applications and bindings uses the various apis easier to integrate into different logging mechanisms. This would be nice for the Python bindings. Changed: - Updated the API to call with various params over just a single string. - Added SYS and ESYS routines. - Updated Visual Studios build configs. TODO: 1. Add FAPI support 2. Test 3. Fiddle with names, style and locations in the code base Signed-off-by: William Roberts <william.c.roberts@intel.com>
- Loading branch information
William Roberts
committed
Jun 8, 2021
1 parent
05beb08
commit a92c4f0
Showing
13 changed files
with
112 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -362,3 +362,4 @@ EXPORTS | |
Esys_ZGen_2Phase | ||
Esys_ZGen_2Phase_Async | ||
Esys_ZGen_2Phase_Finish | ||
Esys_SetLogHandler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,6 +365,7 @@ | |
Esys_Initialize; | ||
Esys_GetPollHandles; | ||
Esys_Finalize; | ||
Esys_SetLogHandler; | ||
local: | ||
*; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* SPDX-License-Identifier: BSD-2-Clause */ | ||
#ifdef HAVE_CONFIG_H | ||
#include <config.h> | ||
#endif | ||
|
||
#include "tss2_esys.h" | ||
#define LOGMODULE esys | ||
#include "util/log.h" | ||
|
||
TSS2_LOG_HANDLER | ||
Esys_SetLogHandler( | ||
TSS2_LOG_HANDLER new_handler) | ||
{ | ||
return set_log_handler(new_handler); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* SPDX-License-Identifier: BSD-2-Clause */ | ||
/***********************************************************************; | ||
* Copyright (c) 2015 - 2018, Intel Corporation | ||
* All rights reserved. | ||
***********************************************************************/ | ||
#ifdef HAVE_CONFIG_H | ||
#include <config.h> | ||
#endif | ||
|
||
#include "tss2_sys.h" | ||
#define LOGMODULE sys | ||
#include "util/log.h" | ||
|
||
TSS2_LOG_HANDLER | ||
Tss2_Sys_SetLogHandler( | ||
TSS2_LOG_HANDLER new_handler) | ||
{ | ||
return set_log_handler(new_handler); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters