question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gcsfs v0.7.0 overrides python logging in any importing module

See original GitHub issue

What happened:

None of our logging statements are printing to console when we import gcsfs

What you expected to happen:

The logging statements should print to console

Minimal Complete Verifiable Example:

import gcsfs
import logging
logging.basicConfig(level=logging.INFO)
logging.info("hello")

Nothing shows up when I run the above code…

Anything else we need to know?:

Here are some suspicious lines of code:

$ ag logging                                                                                                                                                                           (base)
auth.py
6:import logging
9:logging.basicConfig()

core.py
21:import logging
39:logger = logging.getLogger(__name__)
40:logging.basicConfig()
136:      containing the JSON returned by logging in with the gcloud CLI tool,

cli/gcsfuse.py
2:import logging
36:    help="Set logging level. '-v' for 'gcsfuse' logging."
37:    "'-v -v' for complete debug logging.",
45:        logging.basicConfig(level=logging.INFO)
46:        logging.getLogger("gcsfs.gcsfuse").setLevel(logging.DEBUG)
48:        logging.basicConfig(level=logging.DEBUG)
52:        logging.basicConfig(level=logging.INFO, format=fmt)
53:        logging.getLogger("gcsfs.gcsfuse").setLevel(logging.DEBUG)
55:        logging.basicConfig(level=logging.DEBUG, format=fmt)

Environment:

  • Dask version: 2.5.2
  • Python version: 3.7.3
  • Operating System: Mac
  • Install method (conda, pip, source): pip

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
martindurantcommented, Sep 4, 2020

I anticipate a round of releases mid next week.

0reactions
nbren12commented, Sep 4, 2020

Thanks. Feel free to close this issue if you like, since the problem is resolved on master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overriding a third-party module's logger? - Stack Overflow
When I try to set up my own logger, it doesn't seem to work. Here's my code: import logging import stanza logger =...
Read more >
logging — Logging facility for Python — Python 3.11.1 ...
This module defines functions and classes which implement a flexible event logging system for applications and libraries. The key benefit of having the...
Read more >
GCSFS — GCSFs 2022.11.0+2.g111769a documentation
GCSFS ¶. A pythonic file-system interface to Google Cloud Storage. This software is beta, use at your own risk. Please file issues and...
Read more >
Serialization and IO — xarray 0.10.1 documentation - PyData |
The simplest way to serialize an xarray object is to use Python's built-in pickle module: In [1]: import pickle In [2]: ds = ......
Read more >
pygogo · PyPI
pygogo leverages the standard Python logging module under the hood, so there's no need to learn yet-another logging library. The default implementation sends ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found