[jboss-user] [JBoss Seam] - Problem with variable argument list logging

tomas.petersson do-not-reply at jboss.com
Thu Oct 18 12:04:56 EDT 2007


Hello, i have a problem with logging. In the Seam reference, chapter 3.6. Logging, it says:

Seam provides a logging API that simplifies this code significantly:

@Logger private Log log;
        
public Order createOrder(User user, Product product, int quantity) {
    log.debug("Creating new order for user: #0 product: #1 quantity: #2", user.username(), product.name(), quantity);
    return new Order(user, product, quantity);
}

But when I try:
log.debug("delete() deleting entity: #1", entity.toString() );

I get this output:
delete() deleting entity: #1

not the expected:
delete() deleting entity: <to_string_of_my_entity>

See:
http://docs.jboss.com/seam/1.2.1.GA/reference/en/html/concepts.html#d0e3162

Regards, Tomas Petersson

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096637#4096637

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096637



More information about the jboss-user mailing list