Re: Jython-Netty-Client logging

Master Of The <[email protected]>
Newsgroups gmane.comp.lang.jython.user
Message-ID <[email protected]>
I am using PythonInterpreter in my Scala app as scripting add-on ... this
is what Ive found that works (guess you can do same with XML config
file, but I already have central config file for whole app):

val root_logger = LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME).asInstanceOf[ch.qos.logback.classic.Logger]
if (CFG.get("global", "log_level") == "info")
  root_logger.setLevel(ch.qos.logback.classic.Level.INFO)
else if (CFG.get("global", "log_level") == "warn")
  root_logger.setLevel(ch.qos.logback.classic.Level.WARN)
else
  root_logger.setLevel(ch.qos.logback.classic.Level.ERROR)

Regards

On Sun, Oct 11, 2015 at 06:26:11AM +0000, Darjus Loktevic wrote:
>    Can you try the following?
> 
>    log = logging.getLogger("_socket")
>    log.setLevel(level=logging.WARNING)
> 
>    Also, if that does not help, please share with us how you enable logging
>    in the first place?
> 
>    Darjus
>    On Sat, Oct 10, 2015 at 4:49 AM Master Of The
>    <[1][email protected]> wrote:
> 
>      Hi,
> 
>      Ive been trying to suppress Netty debug logging in Jython but with no
>      success. What is the correct way to set logging level of Jython netty
>      client?
> 
>      I have messages like this all over my log:
> 
>      12:23:20.241 [Jython-Netty-Client-0] DEBUG
>      o.p.n.channel.DefaultChannelPipeline - Discarded inbound message
>      UnpooledUnsafeDirectByteBuf(ridx: 0, widx: 11, cap: 4096) that reached
>      at the tail of the pipeline. Please check your pipeline configuration.
> 
>      Regards
>      --
>      Master Of The
>      [2][email protected]
> 
>      ------------------------------------------------------------------------------
>      _______________________________________________
>      Jython-users mailing list
>      [3][email protected]
>      [4]https://lists.sourceforge.net/lists/listinfo/jython-users
> 
> References
> 
>    Visible links
>    1. mailto:[email protected]
>    2. mailto:[email protected]
>    3. mailto:[email protected]
>    4. https://lists.sourceforge.net/lists/listinfo/jython-users

-- 
Master Of The
[email protected]

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.