code: func (api *PublicFilterAPI) Logs(ctx context.Context, crit FilterCriteria) (*rpc.Subscription, error) {
  	notifier, supported := rpc.NotifierFromContext(ctx)
  	if !supported {
  		return &rpc.Subscription{}, rpc.ErrNotificationsUnsupported
  	}
  
  	var (
  		rpcSub      = notifier.CreateSubscription()
  		matchedLogs = make(chan []*types.Log)
  	)
  
  	logsSub, err := api.events.SubscribeLogs(ethereum.FilterQuery(crit), matchedLogs)
  	if err != nil {
  		return nil, err
  	}
  
  	go func() {
  
  		for {
  			select {
  			case logs := <-matchedLogs:
  				for _, log := range logs {
  					notifier.Notify(rpcSub.ID, &log)
  				}
  			case <-rpcSub.Err(): // client send an unsubscribe request
  				logsSub.Unsubscribe()
  				return
  			case <-notifier.Closed(): // connection dropped
  				logsSub.Unsubscribe()
  				return
  			}
  		}
  	}()
  
  	return rpcSub, nil
  }
docs: // Logs creates a subscription that fires for all new log that match the given filter criteria.