[Groonga-commit] pgroonga/pgroonga at a5369c6 [master] Use more meaningful name

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue Nov 29 00:59:56 JST 2016


Kouhei Sutou	2016-11-29 00:59:56 +0900 (Tue, 29 Nov 2016)

  New Revision: a5369c66e531e4396fc484b63ce5bf2d29670eed
  https://github.com/pgroonga/pgroonga/commit/a5369c66e531e4396fc484b63ce5bf2d29670eed

  Message:
    Use more meaningful name

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

  Modified: src/pgrn_variables.c (+14 -10)
===================================================================
--- src/pgrn_variables.c    2016-11-29 00:59:23 +0900 (a61a045)
+++ src/pgrn_variables.c    2016-11-29 00:59:56 +0900 (1ad9df7)
@@ -110,14 +110,18 @@ PGrnLogTypeAssign(int new_value, void *extra)
 static void
 PGrnLogPathAssignRaw(const char *new_value)
 {
-	if (new_value) {
-		if (PGrnIsNoneValue(new_value)) {
-			grn_default_logger_set_path(NULL);
-		} else {
-			grn_default_logger_set_path(new_value);
-		}
-	} else {
-		grn_default_logger_set_path(PGrnLogBasename);
+	if (!new_value)
+	{
+		new_value = PGrnLogPathDefault;
+	}
+
+	if (PGrnIsNoneValue(new_value))
+	{
+		grn_default_logger_set_path(NULL);
+	}
+	else
+	{
+		grn_default_logger_set_path(new_value);
 	}
 }
 
@@ -233,10 +237,10 @@ PGrnInitializeVariables(void)
 	PGrnDefineCustomStringVariable("pgroonga.log_path",
 								   "Log path for PGroonga.",
 								   "The default is "
-								   "\"${PG_DATA}/" PGrnLogBasename "\". "
+								   "\"${PG_DATA}/" PGrnLogPathDefault "\". "
 								   "Use \"none\" to disable file output.",
 								   &PGrnLogPath,
-								   NULL,
+								   PGrnLogPathDefault,
 								   PGC_USERSET,
 								   0,
 								   NULL,

  Modified: src/pgroonga.h (+1 -1)
===================================================================
--- src/pgroonga.h    2016-11-29 00:59:23 +0900 (9edeac4)
+++ src/pgroonga.h    2016-11-29 00:59:56 +0900 (7335e7a)
@@ -38,7 +38,7 @@
 #define PGRN_N_STRATEGIES PGrnPrefixRKContainStrategyV2Number
 
 /* file and table names */
-#define PGrnLogBasename					"pgroonga.log"
+#define PGrnLogPathDefault				"pgroonga.log"
 #define PGrnQueryLogPathDefault			"none"
 #define PGrnDatabaseBasename			"pgrn"
 #define PGrnSourcesTableNamePrefix		"Sources"
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る