[Groonga-commit] pgroonga/pgroonga at 9376ebe [master] Put PID to log

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Nov 24 00:16:51 JST 2016


Kouhei Sutou	2016-11-24 00:16:51 +0900 (Thu, 24 Nov 2016)

  New Revision: 9376ebe7b7d7b446c6732fa5a89530fe4264bbf5
  https://github.com/pgroonga/pgroonga/commit/9376ebe7b7d7b446c6732fa5a89530fe4264bbf5

  Message:
    Put PID to log

  Modified files:
    src/pgrn_variables.c
    src/pgroonga.c

  Modified: src/pgrn_variables.c (+4 -1)
===================================================================
--- src/pgrn_variables.c    2016-11-24 00:00:20 +0900 (0d9b9df)
+++ src/pgrn_variables.c    2016-11-24 00:16:51 +0900 (096be64)
@@ -73,9 +73,12 @@ PGrnPostgreSQLLoggerLog(grn_ctx *ctx, grn_log_level level,
 	}
 }
 
+#ifndef GRN_LOG_PID
+#	define GRN_LOG_PID (0)
+#endif
 static grn_logger PGrnPostgreSQLLogger = {
 	GRN_LOG_DEFAULT_LEVEL,
-	GRN_LOG_TIME | GRN_LOG_MESSAGE,
+	GRN_LOG_TIME | GRN_LOG_MESSAGE | GRN_LOG_PID,
 	NULL,
 	PGrnPostgreSQLLoggerLog,
 	NULL,

  Modified: src/pgroonga.c (+4 -0)
===================================================================
--- src/pgroonga.c    2016-11-24 00:00:20 +0900 (b8f8386)
+++ src/pgroonga.c    2016-11-24 00:16:51 +0900 (7427fe3)
@@ -385,6 +385,10 @@ _PG_init(void)
 
 	grn_thread_set_get_limit_func(PGrnGetThreadLimit, NULL);
 
+#ifdef GRN_LOG_PID
+	grn_default_logger_set_flags(grn_default_logger_get_flags() | GRN_LOG_PID);
+#endif
+
 	if (grn_init() != GRN_SUCCESS)
 		ereport(ERROR,
 				(errcode(ERRCODE_SYSTEM_ERROR),
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index