/*
初始数据库应用
*/
package init

import (
	"app.yhyue.com/moapp/jybase/mongodb"
	"log"
	"jyBXCore/entity"
)

var (
	MgoLog mongodb.MongodbSim
)

func MongoDBInit(em *entity.Mongo) {
	//
	if em.MgoLog.Address != "" {
		log.Println("--初始化 mongodb log--")
		MgoLog = mongodb.MongodbSim{
			MongodbAddr: em.MgoLog.Address,
			Size:        em.MgoLog.Size,
			DbName:      em.MgoLog.DbName,
			UserName:    em.MgoLog.UserName,
			Password:    em.MgoLog.Password,
		}
		MgoLog.InitPool()
	}
}
