Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Changed bool
View Source
var FileHook *lumberjackrus.Hook
Functions ¶
func InitConfig ¶
func InitConfig()
func InitProfiling ¶
func InitProfiling()
func LevelStrParse ¶
func PrepareConfig ¶
func PrepareConfig()
func PrintMemUsage ¶
func PrintMemUsage()
func ReloadConfig ¶
func UpdateLogLevel ¶
func UpdateLogLevel()
Types ¶
type MainConfig ¶
type MainConfig struct { CriticalCheckSec int NormalCheckSec int LogFile string LogFileSize int LogLevel string RLogLevel string DownloadQuality string DownloadDir string UploadDir string Module []ModuleConfig ExpressPort string EnableTS2MP4 bool ExtraConfig map[string]interface{} }
var Config *MainConfig
type ModuleConfig ¶
type ModuleConfig struct { //EnableProxy bool //Proxy string Name string Enable bool Users []UsersConfig DownloadProvider string ExtraConfig map[string]interface{} }
type UsersConfig ¶
type WriterHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
var ConsoleHook *WriterHook
func (*WriterHook) Fire ¶
func (hook *WriterHook) Fire(entry *logrus.Entry) error
Fire will be called when some logging function is called with current hook It will format logrus entry to string and write it to appropriate writer
func (*WriterHook) Levels ¶
func (hook *WriterHook) Levels() []logrus.Level
Levels define on which logrus levels this hook would trigger
Click to show internal directories.
Click to hide internal directories.