~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2009-09-23 06:01:45 UTC
  • mto: This revision was merged to the branch mainline in revision 4712.
  • Revision ID: mbp@sourcefrog.net-20090923060145-74wgpgv0knm8x6xm
Restore info, log_error and error, as deprecated functions

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
import bzrlib
73
73
 
 
74
from bzrlib.symbol_versioning import (
 
75
    deprecated_function,
 
76
    deprecated_in,
 
77
    )
 
78
 
74
79
lazy_import(globals(), """
75
80
from bzrlib import (
76
81
    debug,
122
127
    _bzr_logger.warning(*args, **kwargs)
123
128
 
124
129
 
 
130
@deprecated_function(deprecated_in((2, 1, 0)))
 
131
def info(*args, **kwargs):
 
132
    """Deprecated: use trace.note instead."""
 
133
    note(*args, **kwargs)
 
134
 
 
135
 
 
136
@deprecated_function(deprecated_in((2, 1, 0)))
 
137
def log_error(*args, **kwargs):
 
138
    """Deprecated: use bzrlib.trace.show_error instead"""
 
139
    _bzr_logger.error(*args, **kwargs)
 
140
 
 
141
 
 
142
@deprecated_function(deprecated_in((2, 1, 0)))
 
143
def error(*args, **kwargs):
 
144
    """Deprecated: use bzrlib.trace.show_error instead"""
 
145
    _bzr_logger.error(*args, **kwargs)
 
146
 
 
147
 
 
148
def show_error(msg):
 
149
    """Show an error message to the user.
 
150
 
 
151
    Don't use this for exceptions, use report_exception instead.
 
152
    """
 
153
    _bzr_logger.error(*args, **kwargs)
 
154
 
 
155
 
125
156
_last_mutter_flush_time = None
126
157
 
 
158
 
127
159
def mutter(fmt, *args):
128
160
    global _last_mutter_flush_time
129
161
    if _trace_file is None: