Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21800

Re: ultralog: new concept of logging API

From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: ultralog: new concept of logging API
Date 2013-01-27 10:39 -0800
Organization A noiseless patient Spider
Message-ID <ke3s9v$md5$1@dont-email.me> (permalink)
References <0cfefb99-94f9-44e0-9b58-926818a9560d@googlegroups.com>

Show all headers | View raw


On 1/26/2013 10:05 PM, Mikhail Vladimirov wrote:

> Advantages of this approach:


It's an interesting idea.  However I don't think it really does enough 
to make it better than existing logging solutions.

I don't think, for example, the syntax of your approach is any more 
clear than calling a method.  (Your approach is, frankly, a little less 
clear.)

I don't see how defining messages in one place is different than 
existing solutions, which have the same capability.  Nor do I see how it 
interacts with IDEs any better than the current approaches.

So to make this review a little more positive, here's a few things I 
think I'd like in a logger.

The main idea I'd like is the ability to just plain write logging 
statements for me.  For example, given the following code:

package my.package;

public class MyStuff {
    public static void main( String... args ) {
       System.out.println( "Hello World." );
    }
}

I'd like to be able to have the logger, on the fly, instrument this with:

  - a static or instance logger declaration
  - method invocation
  - parameter values on invocation
  - return value, if any
  - variable assignment within the method

All at varying levels of debug priority.  For example, the middle three 
are typically at a level of FINER, while the last one should be FINEST. 
  (The first one obviously has to happen all the time, in order for 
anything to work.)

There's probably more logging patterns, I'm just making one for discussion.

The idea here, and this is very important for the requirements, is 
similar to the idea of Aspect Oriented programming and Cross-Cuts. 
Certain things are necessary in programming (logging is a classic 
example), but are also "noise" when a developer looks at the source code 
(logging is again the classic example of this problem).

Could you imagine the source code above with all of the logging 
statements I asked for?  It would be a mess!  And all for one little 
line of code.

Yet if we instrument the code on the fly, we gain all the benefits of 
fully instrumented code, without having to pay nearly as much price in 
maintenance.

That's what I'm really going for here: logging, but without the cost in 
lines of code.  That would be a real win, imo.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-26 22:05 -0800
  Re: ultralog: new concept of logging API markspace <markspace@nospam.nospam> - 2013-01-27 10:39 -0800
    Re: ultralog: new concept of logging API vladimirow@mail.ru - 2013-01-27 11:03 -0800
      Re: ultralog: new concept of logging API Joerg Meier <joergmmeier@arcor.de> - 2013-01-27 20:48 +0100
        Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-27 20:15 -0800
      Re: ultralog: new concept of logging API Leif Roar Moldskred <leifm@dimnakorr.com> - 2013-01-27 13:51 -0600
        Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-27 19:57 -0800
  Re: ultralog: new concept of logging API Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-01-28 05:23 -0400
    Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-28 01:32 -0800
      Re: ultralog: new concept of logging API Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-01-28 05:37 -0400
        Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-28 02:06 -0800
      Re: ultralog: new concept of logging API Lew <lewbloch@gmail.com> - 2013-01-28 13:49 -0800
        Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-29 06:04 -0800
          Re: ultralog: new concept of logging API Lew <lewbloch@gmail.com> - 2013-01-29 10:19 -0800
          Re: ultralog: new concept of logging API Leif Roar Moldskred <leifm@dimnakorr.com> - 2013-01-29 13:10 -0600
            Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-29 11:34 -0800
              Re: ultralog: new concept of logging API Arne Vajhøj <arne@vajhoej.dk> - 2013-01-29 20:16 -0500
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-29 19:57 -0800
                Re: ultralog: new concept of logging API Lew <lewbloch@gmail.com> - 2013-01-29 22:56 -0800
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-29 23:19 -0800
                Re: ultralog: new concept of logging API Lew <lewbloch@gmail.com> - 2013-01-30 08:23 -0800
                Re: ultralog: new concept of logging API lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-30 16:54 +0000
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-30 13:33 -0800
                Re: ultralog: new concept of logging API tisue@cs.nwu.edu (Seth Tisue) - 2013-01-30 16:37 -0500
                Re: ultralog: new concept of logging API tisue@cs.nwu.edu (Seth Tisue) - 2013-01-30 16:33 -0500
                Re: ultralog: new concept of logging API Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 21:50 -0500
                Re: ultralog: new concept of logging API lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-31 10:38 +0000
                Re: ultralog: new concept of logging API T®oll <spooksRus@derbyshire-crania.org> - 2013-01-31 12:30 -0500
                Re: ultralog: new concept of logging API T®oll <spooksRus@derbyshire-crania.org> - 2013-01-31 12:30 -0500
                Re: ultralog: new concept of logging API lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-31 17:55 +0000
                Re: ultralog: new concept of logging API lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-31 10:48 +0000
                Re: ultralog: new concept of logging API T®oll <spooksRus@derbyshire-crania.org> - 2013-01-31 12:32 -0500
                Re: ultralog: new concept of logging API lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-31 17:58 +0000
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-31 21:49 -0800
                Re: ultralog: new concept of logging API Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 21:47 -0500
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-30 21:14 -0800
                Re: ultralog: new concept of logging API Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 21:43 -0500
                Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-30 21:11 -0800
  Re: ultralog: new concept of logging API Mikhail Vladimirov <vladimirow@mail.ru> - 2013-01-30 13:43 -0800

csiph-web