File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
pyroscope_ffi/python/pyroscope Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 77from pyroscope ._native import lib
88from contextlib import contextmanager
99
10+ LOGGER = logging .getLogger (__name__ )
11+
1012class LineNo (Enum ):
1113 LastInstruction = 0
1214 First = 1
@@ -41,9 +43,9 @@ def configure(
4143 if native is not None :
4244 warnings .warn ("native is deprecated and not supported" , DeprecationWarning )
4345
46+ LOGGER .disabled = not enable_logging
4447 if enable_logging :
45- logger = logging .getLogger ()
46- log_level = logger .getEffectiveLevel ()
48+ log_level = LOGGER .getEffectiveLevel ()
4749 lib .initialize_logging (log_level )
4850
4951 lib .initialize_agent (
@@ -69,9 +71,9 @@ def shutdown():
6971 drop = lib .drop_agent ()
7072
7173 if drop :
72- logging .info ("Pyroscope Agent successfully shutdown" )
74+ LOGGER .info ("Pyroscope Agent successfully shutdown" )
7375 else :
74- logging . warn ("Pyroscope Agent shutdown failed" )
76+ LOGGER . warning ("Pyroscope Agent shutdown failed" )
7577
7678def add_thread_tag (thread_id , key , value ):
7779 lib .add_thread_tag (thread_id , key .encode ("UTF-8" ), value .encode ("UTF-8" ))
You can’t perform that action at this time.
0 commit comments