I think thats hard to do because it runs against the grain for what logging is supposed to do. Usually we "log" the state of the program at a particular line of code, and not the previous execution history. In particular, one expects that only the order of log lines is switched if independent calls are permuted.
On Tuesday, August 16, 2016 at 7:14:27 PM UTC+2, Simon King wrote: > > Hi! > > I made progress turning my optional old-style group cohomology spkg into > a new style package (called "modres", to be added to Sage at some point) > depending on another new-style package (called "meataxe", already part of > Sage), both being wrapped by an OptionalExtension in the Sage library. > Alert me if that's not the way to do it... > > My first question is about logging. The old spkg has a custom logger > that tells by what object it was called, unless it is called repeatedly by > the same object. Thus, if it is called by object A with messages m1 and > m2, > then called by B with messages m3, m4, and again by A with message m5, it > prints > A: m1 > m2 > B: m3 > m4 > A: m5 > > I find that formatting kind of nice and I would like to keep it. But a > potential referee might argue that a custom logger should better be > replaced by using Python's logging module. So, my question: Do you see > an easy way to obtain the above logging behaviour with Python's logging > module ("easy" is a way that does not involve writing a complicated > handler to be passed to a logger by addHandler()). > > My second question is about optional tests. It has been discussed before > whether to have a way to mark *all* tests of a module optional. Has it > meanwhile be implemented in the test framework? After all, we now have > OptionalExtension in module_list.py, and obviously the tests of an > optional extension should be optional, isn't it? > > Best regards, > Simon > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.