~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-27 05:35:00 UTC
  • mfrom: (4570 +trunk)
  • mto: (4634.6.29 2.0)
  • mto: This revision was merged to the branch mainline in revision 4680.
  • Revision ID: andrew.bennetts@canonical.com-20090727053500-q76zsn2dx33jhmj5
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Messages and logging for bazaar-ng.
18
18
 
329
329
    new_trace_file.flush()
330
330
 
331
331
 
332
 
@symbol_versioning.deprecated_function(symbol_versioning.one_two)
333
 
def enable_test_log(to_file):
334
 
    """Redirect logging to a temporary file for a test
335
 
 
336
 
    :returns: an opaque reference that should be passed to disable_test_log
337
 
    after the test completes.
338
 
    """
339
 
    return push_log_file(to_file)
340
 
 
341
 
 
342
 
@symbol_versioning.deprecated_function(symbol_versioning.one_two)
343
 
def disable_test_log(memento):
344
 
    return pop_log_file(memento)
345
 
 
346
 
 
347
332
def log_exception_quietly():
348
333
    """Log the last exception to the trace file only.
349
334
 
398
383
    return _verbosity_level > 0
399
384
 
400
385
 
401
 
@symbol_versioning.deprecated_function(symbol_versioning.one_two)
402
 
def disable_default_logging():
403
 
    """Turn off default log handlers.
404
 
 
405
 
    Don't call this method, use _push_log_file and _pop_log_file instead.
406
 
    """
407
 
    pass
408
 
 
409
 
 
410
386
def debug_memory(message='', short=True):
411
387
    """Write out a memory dump."""
412
388
    if sys.platform == 'win32':