Documentation ¶
Index ¶
- func ClearDir(directory, extension string) error
- func DirectoryList(directory string) ([]string, error)
- func FileList(directory string, extension string) ([]string, error)
- func RelFileList(directory string, extension string) ([]string, error)
- type HfdLog
- func (logger *HfdLog) Debugf(format string, v ...interface{})
- func (logger *HfdLog) Debugfd(fields *dynmap.DynMap, format string, v ...interface{})
- func (logger *HfdLog) Errorf(format string, v ...interface{})
- func (logger *HfdLog) Errorfd(fields *dynmap.DynMap, format string, v ...interface{})
- func (logger *HfdLog) HasErrors() bool
- func (logger *HfdLog) Infof(format string, v ...interface{})
- func (logger *HfdLog) Infofd(fields *dynmap.DynMap, format string, v ...interface{})
- func (logger *HfdLog) Logf(level LogLevel, fields *dynmap.DynMap, format string, v ...interface{})
- func (logger *HfdLog) NewChild() *HfdLog
- type LogLevel
- type LogMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearDir ¶
deletes all files of the given type from the requested directory this operates recursively, but does not remove the empty directories
func DirectoryList ¶
recursively list the directories
func FileList ¶
Filenames will have the passed in directory as a prefix: for instance: FileList("static", "hfd") static/hfd/shelf/four_sided_shelf_with_divider.hfd static/hfd/shelf/three_sided_shelf.hfd static/hfd/shelf/three_sided_shelf_with_divider.hfd
func RelFileList ¶
Same as FileList, but strips the requested directory prefix. for instance: FileList("static", "hfd") hfd/shelf/four_sided_shelf_with_divider.hfd hfd/shelf/three_sided_shelf.hfd hfd/shelf/three_sided_shelf_with_divider.hfd
Types ¶
type HfdLog ¶
type HfdLog struct { // should we also write messages to std out? LogToStdOut LogLevel Messages []LogMessage // these fields will be added to all log messages StaticFields *dynmap.DynMap // contains filtered or unexported fields }
This logger is intended to serve a single Render operation it tracks all log messages in a queue, that can then be displayed to the end user or dropped. if Debug is on, then all messages are written to STD out.