def creationlog(base, package, stackdepth=_def_stackdepth):
@staticmethod<EOL>def wrapnew(cls, *argl, **argd):<EOL><INDENT>global _atdepth_new, _cstack_new, streamlining<EOL>origstream = None<EOL>if not (decorating or streamlining):<EOL><INDENT>entry, _atdepth_new = _pre_create(cls, _atdepth_new,<EOL>stackdepth, *argl, **argd)<EOL>_cstack_new.append(cls)<EOL>fqdn = cls.__fqdn__<EOL>if fqdn in _streamlines and _streamlines[fqdn]:<EOL><INDENT>msg.std("<STR_LIT>".format(fqdn), <NUM_LIT:2>)<EOL>origstream = streamlining<EOL>streamlining = True<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if six.PY2:<EOL><INDENT>result = base.__old__(cls, *argl, **argd)<EOL><DEDENT>else: <EOL><INDENT>if base.__old__ is object.__new__:<EOL><INDENT>result = base.__old__(cls)<EOL><DEDENT>else:<EOL><INDENT>result = base.__old__(cls, *argl, **argd)<EOL><DEDENT><DEDENT><DEDENT>except TypeError: <EOL><INDENT>import sys<EOL>xcls, xerr = sys.exc_info()[<NUM_LIT:0>:<NUM_LIT:2>]<EOL>referral = xerr.args[<NUM_LIT:0>].split()[-<NUM_LIT:1>]<EOL>if "<STR_LIT>" in referral:<EOL><INDENT>t = eval(referral.split('<STR_LIT:.>')[<NUM_LIT:0>])<EOL>result = t.__new__(cls, *argl, **argd)<EOL><DEDENT>else:<EOL><INDENT>raise<EOL>result = None<EOL><DEDENT><DEDENT>if result is not None and hasattr(cls, "<STR_LIT>"):<EOL><INDENT>try:<EOL><INDENT>cls.__init__(result, *argl, **argd)<EOL><DEDENT>except: <EOL><INDENT>print(cls, argl, argd)<EOL>raise<EOL><DEDENT><DEDENT>else: <EOL><INDENT>msg.err("<STR_LIT>".format(base.__name__))<EOL><DEDENT>if origstream is not None:<EOL><INDENT>streamlining = origstream<EOL><DEDENT>if not (decorating or streamlining):<EOL><INDENT>_cstack_new.pop()<EOL>if len(_cstack_new) == <NUM_LIT:0>:<EOL><INDENT>_atdepth_new = False<EOL><DEDENT>_post_create(_atdepth_new, entry, result)<EOL><DEDENT>return result<EOL><DEDENT>return wrapnew<EOL>
Decorator for wrapping the creation of class instances that are being logged
    by acorn.

    Args:
        base: base class used to call __new__ for the construction.
        package (str): name of (global) package the class belongs to.
        stackdepth (int): if the calling stack is less than this depth, than
          include the entry in the log; otherwise ignore it.