DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
  • How To Use Geo-Partitioning to Comply With Data Regulations and Deliver Low Latency Globally

Trending

  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
  • How To Use Geo-Partitioning to Comply With Data Regulations and Deliver Low Latency Globally
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Maintenance
  4. Logback Config – Showing Debug Level

Logback Config – Showing Debug Level

Gordon Dickens user avatar by
Gordon Dickens
·
Jul. 25, 13 · Interview
Like (0)
Save
Tweet
Share
12.02K Views

Join the DZone community and get the full member experience.

Join For Free

Showing Debug Logback Configuration

Logback provides the functionality to enable debug level output of its own status.

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">

yields 

INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/code/MyProject/target/test-classes/logback-test.xml]
INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]
INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.myco] to DEBUG
INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.test.web.servlet] to TRACE
INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.web.servlet] to TRACE
INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
INFO in ch.qos.logback.classic.joran.JoranConfigurator@2c17306 - Registering current configuration as safe fallback point

However, I started using the logback.groovy configuration and I cannot seem to find a way to enable debug in the groovy config. We can turn on debug info via an environment variable logback.debug

  • Environment Variable: logback.debug=true
  • Java Define: -Dlogback.debug=true
Debug (command)

Published at DZone with permission of Gordon Dickens, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • RAML vs. OAS: Which Is the Best API Specification for Your Project?
  • Five Java Books Beginners and Professionals Should Read
  • A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
  • How To Use Geo-Partitioning to Comply With Data Regulations and Deliver Low Latency Globally

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: