Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8160873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:22:27+00:00 2026-06-06T18:22:27+00:00

Mainly this is a question about how to get a similar behaviour as java

  • 0

Mainly this is a question about how to get a similar behaviour as java logging, where it is enough to create or edit the logging config file to change the behaviour of the logging.

Is this possible in Python without having to modify the scripts which are using logging functions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:22:28+00:00Added an answer on June 6, 2026 at 6:22 pm

    As long as the python program uses the .fileConfig method from the logging module, then yes, you can alter logging configuration by editing a file.

    Generally, the main function of a larger program would call it like this:

    import logging
    
    DEFAULT_LOG_CONFIG = 'somepath/logging.conf'
    
    def main(args):
        ...
        # parse command line arguments or similar
        log_config = options.logconfig or DEFAULT_LOG_CONFIG
        logging.fileConfig(DEFAULT_LOG_CONFIG)
    

    The documentation on the file format is pretty comprehensive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is mainly about protecting the content inside my iOS app. I intend
I tagged this question both Java and Scala because while I mainly develop on
I am posting this question after reading other similar questions about my problem but
This question is mainly to verify my current idea. I have a series of
This question is mainly aimed at shared libraries (.so files) compiled for Linux platforms.
This question and my answer below are mainly in response to an area of
Hey guys, hope this isn't too much of a n00b question I'm mainly a
I have a question about threading in Silverlight. I come mainly from a winForms
I've checked other threads about this subject, but nothing really answers my exact question.
I just have a quick question about how you would typically approach this. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.