package public
import (
	"log"
	"os"
)

var		Loger							*	log.Logger

func PrintLog(v ...interface{}){
	log.SetPrefix("Output ")
	log.Println(v ...)
} 
func PntInfo(v ...interface{}){
	Loger.SetPrefix("Info ")
	Loger.Println(v ...)
}
func PntReport(v ...interface{}){
	Loger.SetPrefix("Report ")
	Loger.Println(v ...)
}
func PntExec(v ...interface{}){
	Loger.SetPrefix("Exec ")
	Loger.Println(v ...)
}
func PntBackup(v ...interface{}){
	Loger.SetPrefix("Bakcup ")
	Loger.Println(v ...)
}
func PntReg(v ...interface{}){
	Loger.SetPrefix("Reg ")
	Loger.Println(v ...)
}
func PntError(v ...interface{}){
	Loger.SetPrefix("Error ")
	Loger.Println(v ...)
}
func PntOth(v ...interface{}){
	Loger.SetPrefix("Other ")
	Loger.Println(v ...)
}
func PntWol(v ...interface{}){
	Loger.SetPrefix("WOL ")
	Loger.Println(v ...)
}
func PntSend(v ...interface{}){
	Loger.SetPrefix("Send ")
	Loger.Println(v ...)
}
func NewLoger(s string) * log.Logger{
	var		Log_file_obj					*	os.File
	var 	err 								error
	if Log_file_obj,err = os.OpenFile(
		s,os.O_RDWR|os.O_CREATE|os.O_APPEND, 0766);
		err !=nil && DomainComputer(){
			SendServerErrorf("%s %v-%v",s,Error_Fail_File_Open,err)
		}
	return log.New(Log_file_obj,"",log.LstdFlags)
}