code: func (l *coreLogger) Open() error {
  	l.lock.Lock()
  	defer l.lock.Unlock()
  
  	if l.open {
  		return nil
  	}
  
  	if l.ErrorWriter == nil {
  		return errors.New("Logger.ErrorWriter must be set.")
  	}
  	if l.BufferSize < 0 {
  		return errors.New("Logger.BufferSize must be no less than 0.")
  	}
  	if l.CallStackDepth < 0 {
  		return errors.New("Logger.CallStackDepth must be no less than 0.")
  	}
  
  	l.entries = make(chan *Entry, l.BufferSize)
  	var targets []Target
  	for _, target := range l.Targets {
  		if err := target.Open(l.ErrorWriter); err != nil {
  			fmt.Fprintf(l.ErrorWriter, "Failed to open target: %v", err)
  		} else {
  			targets = append(targets, target)
  		}
  	}
  	l.Targets = targets
  
  	go l.process()
  
  	l.open = true
  
  	return nil
  }
docs: // Open prepares the logger and the targets for logging purpose.
  // Open must be called before any message can be logged.