Code Monkey home page Code Monkey logo

Comments (7)

codahale avatar codahale commented on May 13, 2024

What are the levels of the statements you see when you change the threshold to ALL?

from dropwizard.

dehora avatar dehora commented on May 13, 2024

Ah; nothing, unless logging/level is DEBUG. I removed the loggers to get to this

logging:
  level: INFO
  file:
    enabled: true
    threshold: ALL
    currentLogFilename: migration.log
    archivedLogFilenamePattern: migration-%d.log.gz
    archivedFileCount: 5
    timeZone: UTC

Otoh, This will log to file

logging:
  level: DEBUG # @@@
  file:
    enabled: true
    threshold: ALL
    currentLogFilename: migration.log
    archivedLogFilenamePattern: migration-%d.log.gz
    archivedFileCount: 5
    timeZone: UTC

But also outputs jersey/jetty, which I'm trying to skip.

from dropwizard.

codahale avatar codahale commented on May 13, 2024

You said "If I change file/threshold to DEBUG/ALL, I see file logging." Please show me some of that.

from dropwizard.

codahale avatar codahale commented on May 13, 2024

I think you might just want to leave the thresholds alone and use a specific logger for your application:

logging:
  loggers:
    com.myapp.service: ALL

from dropwizard.

dehora avatar dehora commented on May 13, 2024

Please show me some of that.

https://gist.github.com/2dd4540d760a84293300

leave the thresholds alone

Can't get any file logging without logging/level. I can set these to reduce noise,

com.sun.jersey: WARN
com.yammer.dropwizard: WARN
org.hibernate.validator: WARN

But if i do this,

org.eclipse.jetty: WARN

No logging to file. Logs to file -

logging:
  level: DEBUG
  loggers:
    net.amadan.sal.migration: INFO
    com.sun.jersey: WARN
    com.yammer.dropwizard: WARN
    org.hibernate.validator: WARN
  file:
    enabled: true
    currentLogFilename: migration.log
    archivedLogFilenamePattern: migration-%d.log.gz
    archivedFileCount: 5
    timeZone: UTC

Does not log to file -

logging:
  level: DEBUG
  loggers:
    net.amadan.sal.migration: INFO
    com.sun.jersey: WARN
    com.yammer.dropwizard: WARN
    org.hibernate.validator: WARN
    org.eclipse.jetty: WARN # ಠ_ಠ 
  file:
    enabled: true
    currentLogFilename: migration.log
    archivedLogFilenamePattern: migration-%d.log.gz
    archivedFileCount: 5
    timeZone: UTC

Am fairly sure I'm doing something stupid.

from dropwizard.

codahale avatar codahale commented on May 13, 2024

You might want to read the Logback documentation to learn how it works.

I would suggest using this configuration:

logging:
  loggers:
    net.amadan.sal.migration: DEBUG
  file:
    enabled: true
    currentLogFilename: migration.log
    archivedLogFilenamePattern: migration-%d.log.gz
    archivedFileCount: 5
    timeZone: UTC

from dropwizard.

dehora avatar dehora commented on May 13, 2024

You might want to read the Logback documentation to learn how it works.

I will do that. Thanks for the help.

from dropwizard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.