func NewAuditLog(dataDir string) (IAuditLog, error) {
	// create a directory for session logs:
	if err := os.MkdirAll(dataDir, 0770); err != nil {
		return nil, trace.Wrap(err)
	}
	return &AuditLog{
		loggers:        make(map[session.ID]*SessionLogger, 0),
		dataDir:        dataDir,
		RotationPeriod: defaults.LogRotationPeriod,
		TimeSource:     time.Now,
	}, nil
}
// Creates and returns a new Audit Log oboject whish will store its logfiles
// in a given directory>
Creates and returns a new Audit Log oboject whish will store its logfiles
in a given directory>
// Creates and returns a new Audit Log oboject whish will store its logfiles // in a given directory >
func NewAuditLog(dataDir string) (IAuditLog, error) {
	if err := os.MkdirAll(dataDir, 0770); err != nil {
		return nil, trace.Wrap(err)
	}
	return &AuditLog{
		loggers:        make(map[session.ID]*SessionLogger, 0),
		dataDir:        dataDir,
		RotationPeriod: defaults.LogRotationPeriod,
		TimeSource:     time.Now,
	}, nil
}
func NewAuditLog ( dataDir string ) ( IAuditLog , error ) { if err := os . MkdirAll ( dataDir , 0770 ) ; err != nil { return nil , trace . Wrap ( err ) } return & AuditLog { loggers : make ( map [ session . ID ] * SessionLogger , 0 ) , dataDir : dataDir , RotationPeriod : defaults . LogRotationPeriod , TimeSource : time . Now , } , nil }
Creates and returns a new Audit Log oboject whish will store its logfiles
in a given directory>
Creates and returns a new Audit Log oboject whish will store its logfiles in a given directory >
// create a directory for session logs: