make log dir a variable
This commit is contained in:
parent
012ec6a998
commit
e83a808b05
@ -20,6 +20,11 @@ import (
|
|||||||
// defaultNamespace to use if not provided as an option
|
// defaultNamespace to use if not provided as an option
|
||||||
const defaultNamespace = "default"
|
const defaultNamespace = "default"
|
||||||
|
|
||||||
|
var (
|
||||||
|
// The directory for logs to be output
|
||||||
|
LogDir = filepath.Join(os.TempDir(), "micro", "logs")
|
||||||
|
)
|
||||||
|
|
||||||
type localRuntime struct {
|
type localRuntime struct {
|
||||||
sync.RWMutex
|
sync.RWMutex
|
||||||
// options configure runtime
|
// options configure runtime
|
||||||
@ -46,8 +51,7 @@ func NewRuntime(opts ...runtime.Option) runtime.Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make the logs directory
|
// make the logs directory
|
||||||
path := filepath.Join(os.TempDir(), "micro", "logs")
|
os.MkdirAll(LogDir, 0755)
|
||||||
_ = os.MkdirAll(path, 0755)
|
|
||||||
|
|
||||||
return &localRuntime{
|
return &localRuntime{
|
||||||
options: options,
|
options: options,
|
||||||
|
Loading…
Reference in New Issue
Block a user