vlog: add vpath flag, remove unused interface.
MultiPart: 1/2
Change-Id: I5b009a0140bbb976be1f41f727db944d5279bf4e
diff --git a/vlog/.api b/vlog/.api
index 206d6c8..d4e2286 100644
--- a/vlog/.api
+++ b/vlog/.api
@@ -78,9 +78,6 @@
pkg vlog, type ModuleSpec struct
pkg vlog, type ModuleSpec struct, embedded llog.ModuleSpec
pkg vlog, type OverridePriorConfiguration bool
-pkg vlog, type Runtime interface { Logger, NewLogger }
-pkg vlog, type Runtime interface, Logger() Logger
-pkg vlog, type Runtime interface, NewLogger(string, ...LoggingOpts) (Logger, error)
pkg vlog, type StderrThreshold llog.Severity
pkg vlog, type TraceLocation struct
pkg vlog, type TraceLocation struct, embedded llog.TraceLocation
diff --git a/vlog/flags.go b/vlog/flags.go
index 21a21d2..86b6ced 100644
--- a/vlog/flags.go
+++ b/vlog/flags.go
@@ -18,6 +18,8 @@
verbosity Level
stderrThreshold StderrThreshold = StderrThreshold(llog.ErrorLog)
vmodule ModuleSpec
+ vpath FilepathSpec
+
traceLocation TraceLocation
maxStackBufSize int
)
@@ -34,7 +36,8 @@
{"max_stack_buf_size", &maxStackBufSize, 4192 * 1024, "max size in bytes of the buffer to use for logging stack traces"},
{"v", &verbosity, nil, "log level for V logs"},
{"stderrthreshold", &stderrThreshold, nil, "logs at or above this threshold go to stderr"},
- {"vmodule", &vmodule, nil, "comma-separated list of pattern=N settings for file-filtered logging"},
+ {"vmodule", &vmodule, nil, "comma-separated list of pattern=N settings for filename-filtered logging"},
+ {"vpath", &vpath, nil, "comma-separated list of pattern=N settings for file pathname-filtered logging"},
{"log_backtrace_at", &traceLocation, nil, "when logging hits line file:N, emit a stack trace"},
}
@@ -85,6 +88,7 @@
Level(verbosity),
StderrThreshold(stderrThreshold),
ModuleSpec(vmodule),
+ FilepathSpec(vpath),
TraceLocation(traceLocation),
MaxStackBufSize(maxStackBufSize),
)
diff --git a/vlog/model.go b/vlog/model.go
index ed00124..8f8e75c 100644
--- a/vlog/model.go
+++ b/vlog/model.go
@@ -172,14 +172,3 @@
// LogDir returns the currently configured directory for storing logs.
LogDir() string
}
-
-// Runtime defines the methods that the runtime must implement.
-type Runtime interface {
- // Logger returns the current logger, if any, in use by the Runtime.
- // TODO(cnicolaou): remove this.
- Logger() Logger
-
- // NewLogger creates a new instance of the logging interface that is
- // separate from the one provided by Runtime.
- NewLogger(name string, opts ...LoggingOpts) (Logger, error)
-}