[Groonga-commit] groonga/grnci at d1ccff5 [master] Use int instead of LogLevel

Back to archive index

Susumu Yata null+****@clear*****
Thu Nov 9 14:49:59 JST 2017


Susumu Yata	2017-11-09 14:49:59 +0900 (Thu, 09 Nov 2017)

  New Revision: d1ccff5feb0d29337e1b6eb0fa97606c7f9db781
  https://github.com/groonga/grnci/commit/d1ccff5feb0d29337e1b6eb0fa97606c7f9db781

  Message:
    Use int instead of LogLevel

  Modified files:
    v2/libgrn/libgrn.go

  Modified: v2/libgrn/libgrn.go (+11 -14)
===================================================================
--- v2/libgrn/libgrn.go    2017-11-09 14:45:49 +0900 (a66a56e)
+++ v2/libgrn/libgrn.go    2017-11-09 14:49:59 +0900 (9b1fbc6)
@@ -245,21 +245,18 @@ func (db *grnDB) Dup() (*grnCtx, error) {
 	return ctx, nil
 }
 
-// LogLevel represents a log level.
-type LogLevel int
-
 // Log levels from lower to higher.
 const (
-	LogNone    = LogLevel(C.GRN_LOG_NONE)
-	LogEmerg   = LogLevel(C.GRN_LOG_EMERG)
-	LogAlert   = LogLevel(C.GRN_LOG_ALERT)
-	LogCrit    = LogLevel(C.GRN_LOG_CRIT)
-	LogError   = LogLevel(C.GRN_LOG_ERROR)
-	LogWarning = LogLevel(C.GRN_LOG_WARNING)
-	LogNotice  = LogLevel(C.GRN_LOG_NOTICE)
-	LogInfo    = LogLevel(C.GRN_LOG_INFO)
-	LogDebug   = LogLevel(C.GRN_LOG_DEBUG)
-	LogDump    = LogLevel(C.GRN_LOG_DUMP)
+	LogNone    = int(C.GRN_LOG_NONE)
+	LogEmerg   = int(C.GRN_LOG_EMERG)
+	LogAlert   = int(C.GRN_LOG_ALERT)
+	LogCrit    = int(C.GRN_LOG_CRIT)
+	LogError   = int(C.GRN_LOG_ERROR)
+	LogWarning = int(C.GRN_LOG_WARNING)
+	LogNotice  = int(C.GRN_LOG_NOTICE)
+	LogInfo    = int(C.GRN_LOG_INFO)
+	LogDebug   = int(C.GRN_LOG_DEBUG)
+	LogDump    = int(C.GRN_LOG_DUMP)
 )
 
 // Log flags.
@@ -278,7 +275,7 @@ type LogOptions struct {
 	// Otherwise, Log changes the maximum log level.
 	//
 	// The default setting is LogNotice.
-	MaxLevel LogLevel
+	MaxLevel int
 
 	// Flags specifies the log flags.
 	// If Flags < 0, Log does not change the log flags.
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171109/030388e1/attachment-0001.htm 



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