Skip to content

Commit

Permalink
Merge pull request #2 from hsanjuan/get_subsystems
Browse files Browse the repository at this point in the history
Lay groundwork for "ipfs log ls" command
  • Loading branch information
whyrusleeping committed May 3, 2016
2 parents 5b415b0 + 6a4e206 commit 57bf3f7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions oldlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ func SetLogLevel(name, level string) error {
return nil
}

// GetSubsystems returns a slice containing the
// names of the current loggers
func GetSubsystems() []string {
subs := make([]string, 0, len(loggers))

for k := range loggers {
subs = append(subs, k)
}
return subs
}

func getLogger(name string) *logging.Logger {
log := logging.MustGetLogger(name)
log.ExtraCalldepth = 1
Expand Down

0 comments on commit 57bf3f7

Please sign in to comment.