mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
go-ipfs-config: refactor(eventlog) integrate into fsrepo
now, eventlogger works wherever the fsrepo is used
This commit is contained in:
parent
13ffe4fbb8
commit
843cc85ede
@ -23,7 +23,6 @@ type Config struct {
|
||||
Version Version // local node's version management
|
||||
Bootstrap []BootstrapPeer // local nodes's bootstrap peers
|
||||
Tour Tour // local node's tour position
|
||||
Logs Logs // local node's event log configuration
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
@ -1,18 +1 @@
|
||||
package config
|
||||
|
||||
// LogsDefaultDirectory is the directory to store all IPFS event logs.
|
||||
var LogsDefaultDirectory = "logs"
|
||||
|
||||
// Logs tracks the configuration of the event logger
|
||||
type Logs struct {
|
||||
Filename string
|
||||
MaxSizeMB uint64
|
||||
MaxBackups uint64
|
||||
MaxAgeDays uint64
|
||||
}
|
||||
|
||||
// LogsPath returns the default path for event logs given a configuration root
|
||||
// (set an empty string to have the default configuration root)
|
||||
func LogsPath(configroot string) (string, error) {
|
||||
return Path(configroot, LogsDefaultDirectory)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user