os: unexport internal logging functions

Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-09-09 16:56:26 +02:00
committed by Enrico Weigelt, metux IT consult .
parent 65a3954b2e
commit f379affc25
44 changed files with 114 additions and 25 deletions

View File

@@ -87,6 +87,7 @@
#endif
#include "os/auth.h"
#include "os/log_priv.h"
/**
* Try to determine a PID for a client from its connection

View File

@@ -98,6 +98,7 @@ SOFTWARE.
#include "os/audit.h"
#include "os/auth.h"
#include "os/client_priv.h"
#include "os/log_priv.h"
#include "os/osdep.h"
#include "misc.h" /* for typedef of pointer */

View File

@@ -35,6 +35,7 @@
#include "dix/input_priv.h"
#include "os/ddx_priv.h"
#include "os/log_priv.h"
#include "inputstr.h"
#include "opaque.h"

View File

@@ -94,6 +94,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "os/bug_priv.h"
#include "os/ddx_priv.h"
#include "os/fmt.h"
#include "os/log_priv.h"
#include "os/osdep.h"
#include "opaque.h"

View File

@@ -8,6 +8,8 @@
#include <sys/types.h>
#include <X11/Xdefs.h>
#include "include/os.h"
/**
* @brief force fsync() on each log write
*
@@ -31,4 +33,46 @@ extern int logVerbosity;
*/
extern int logFileVerbosity;
/**
* @brief initialize logging and open log files
*
* Make backup of existing log file, create a new one and open it for logging.
*
* - May be called with NULL or "", if no logging is desired.
*
* - Must always be called, otherwise log messages will fill up the buffer and
* let it grow infinitely.
*
* - if "%s" is present in fname, it will be replaced with the display string or pid
*
* @param fname log file name template. if NULL, dont write any log.
* @param backup name for the old logfile.
* @return new log file name
*/
const char* LogInit(const char *fname, const char *backup);
/**
* @brief rename the current log file according display name
*
* Renames the current log file with per display prefix (e.g. "Xorg.log.0")
*
*/
void LogSetDisplay(void);
/**
* @brief log exit code, then flush and close log file and write
*
* Logs the exit code (and success/error state), then flush and close log file.
*/
void LogClose(enum ExitCode error);
#ifdef DEBUG
/**
* @brief log debug messages (like errors) if symbol DEBUG is defined
*/
#define DebugF ErrorF
#else
#define DebugF(...) /* */
#endif
#endif /* _XSERVER_LOG_PRIV_H */

View File

@@ -60,6 +60,7 @@ SOFTWARE.
#include "dix/dix_priv.h"
#include "os/busfault.h"
#include "os/log_priv.h"
#include "os/osdep.h"
#include "os/serverlock.h"

View File

@@ -77,9 +77,6 @@ __stdcall unsigned long GetTickCount(void);
#define TRANS_REOPEN
#include <X11/Xtrans/Xtrans.h>
#include "os/audit.h"
#include "os/client_priv.h"
#include "input.h"
#include "dixfont.h"
#include <X11/fonts/libxfont2.h>
@@ -106,10 +103,13 @@ __stdcall unsigned long GetTickCount(void);
#include "dix/dix_priv.h"
#include "dix/input_priv.h"
#include "os/audit.h"
#include "os/auth.h"
#include "os/bug_priv.h"
#include "os/client_priv.h"
#include "os/cmdline.h"
#include "os/ddx_priv.h"
#include "os/log_priv.h"
#include "os/osdep.h"
#include "os/serverlock.h"