twitter4s: как остановить потоки твиттера от печати логов на консоль - PullRequest
1 голос
/ 14 февраля 2020

я использую twitter4s https://github.com/DanielaSfregola/twitter4s ниже приведен код, который я использую для получения твиттер-потока

val streamingClient = TwitterStreamingClient(consumerToken, accessToken)
  def getTweet: PartialFunction[StreamingMessage, Unit] = {
      case tweet: Tweet =>
        //do something with the tweet
    }

    val streaming: Future[TwitterStream] = streamingClient.sampleStatuses(stall_warnings = true)(getTweet)

проблема постоянно в моей консоли полно таких из журналов

    18:15:04.205 52718 [twitter4s-streaming-akka.actor.default-dispatcher-16] StreamingClient DEBUG - Processing message of type Tweet: Tweet(List(),None,2020-02-14T13:14:58Z,None,Some(Entities(List(),List(),List(),None,List(UrlDetails(https://t .co/JOJHfV1o1t,https://twitter.com/i/web/status/1228306640837005314,twitter.com/i/web/status/1…,List(117, 140))),List(),None)),None,Some(ExtendedTweet([Now] President Cyril Ramaphosa announced that the government has introduced a new six-pronged intervention to address SA's high record youth unemployment. Thapelo Maleke  joins @uMaMoshoeshoe to tell us more on #SAfmFocalPoint ,List(0, 227),Some(Entities(List(HashTag(SAfmFocalPoint,List(212, 227))),List(Media(pic.twitter.com/ea05kecWNG,https://twitter.com/SAfmRadio/status/1228306640837005314/photo/1,1228306617936072710,1228306617936072710,List(228, 251),http://pbs.twimg.com/media/EQvSXHVXUAY_0HQ.png,https://pbs.twimg.com/media/EQvSXHVXUAY_0HQ.png,Map(small -> Size(288,fit,512), medium -> Size(288,fit,512), thumb -> Size(150,crop,150), large -> Size(288,fit,512)),None,None,photo,,None)),List(),None,List(),List(UserMention(829401275653640196,829401275653640196,List(178, 192),Masechaba Mtolo,uMaMoshoeshoe)),None)),Some(Entities(List(),List(Media(pic.twitter.com/ea05kecWNG,https://twitter.com/SAfmRadio/status/1228306640837005314/photo/1,1228306617936072710,1228306617936072710,List(228, 251),http://pbs.twimg.com/media/EQvSXHVXUAY_0HQ.png,https://pbs.twimg.com/media/EQvSXHVXUAY_0HQ.png,Map(small -> Size(288,fit,512), medium -> Size(288,fit,512), thumb -> Size(150,crop,150), large -> Size(288,fit,512)),None,None,photo,,None)),List(),None,List(),List(),None)))),0,false,Some(low),None,1228306640837005314,1228306640837005314,None,None,None,None,None,false,Some(en),None,false,None,None,None,Map(),0,false,None,<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a>,[Now] President Cyril Ramaphosa announced that the government has introduced a new six-pronged intervention to addr… https  ://t. co/ JOJHfV1o1t,true,Some(List(0, 140)),Some(User(false,false,false,2009-10-23T04:21:02Z,false,false,Some(SA's only national news and talk radio station. Leading the nation's conversation. The more you listen, the more you'll know. 104-107 FM Across Mzansi),None,None,16326,false,false,168689,2526,true,false,84503659,84503659,false,false,null,399,Some(South Africa),false,SAfmRadio ?,false,2769B3,http://abs.twimg.com/images/themes/theme1/bg.png,https://abs.twimg.com/images/themes/theme1/bg.png,false,Some(https://pbs.twimg.com/profile_banners/84503659/1581675996),ProfileImage(http://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_mini.jpg,http://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_normal.jpg,http://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_bigger.jpg,http://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG.jpg),ProfileImage(https://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_mini.jpg,https://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_normal.jpg,https://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG_bigger.jpg,https://pbs.twimg.com/profile_images/1168453408942153729/maDBrEbG.jpg),2769B3,None,FFFFFF,DDEEF6,333333,true,false,SAfmRadio,false,None,132695,None,Some(none),Some(http://www.safm.co.za),None,true,None,None)),false,List(),None,None)

в этом случае трудно увидеть мои собственные журналы, как я могу отключить его, есть опция в twitter4j http://twitter4j.org/en/configuration.html установка debug = false в конфигурации но я ничего не нашел в twitter4s я использую play framework 2.4.3

...