Ocean/Log/Web/Init.go
Thorsten Sommer 7a4f8acff1 Logging Web Interface
**Work in progress**
+ Added an error message to the template package
2015-02-04 07:58:23 +01:00

20 lines
738 B
Go

package Web
import (
"github.com/SommerEngineering/Ocean/Log"
LM "github.com/SommerEngineering/Ocean/Log/Meta"
WebTemp "github.com/SommerEngineering/Ocean/Log/Web/Templates"
"html/template"
)
func init() {
Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Init the web log.`)
defer Log.LogShort(senderName, LM.CategorySYSTEM, LM.LevelINFO, LM.MessageNameINIT, `Init the web log done.`)
templates = template.New(`root`)
if _, err := templates.Parse(WebTemp.Viewer); err != nil {
Log.LogFull(senderName, LM.CategorySYSTEM, LM.LevelERROR, LM.SeverityCritical, LM.ImpactUnknown, LM.MessageNamePARSE, `Was not able to parse the template for the web log viewer.`, err.Error())
}
}