Results 1 to 5 of 5

Thread: one simple question to ask

  1. #1

    Smile one simple question to ask

    Hello all, I am new in AOP, I have one question, is that so that to Log event, for example what time user login when user log out, which service or method is used by a certain user etc. To log such events , AOP is a good choice? Another question can the log event information be output as a file like pdf file?

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Quote Originally Posted by blust1984 View Post
    Hello all, I am new in AOP, I have one question, is that so that to Log event, for example what time user login when user log out, which service or method is used by a certain user etc. To log such events , AOP is a good choice?
    Yes. You can decorate method invocations via AOP to do things before and/ or after as you wish. Logging, especially for auditing and tracing purposes, is a quite common usecase for AOP.

    Quote Originally Posted by blust1984 View Post
    Another question can the log event information be output as a file like pdf file?
    In theory yes. Though the overhead would be big and I am not sure whether it is possible to dynamically create PDF documents. A better solution would be to create plain text files of limited size (e.g. using a RollingFileAppender) and convert these to PDF later.

  3. #3
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Quote Originally Posted by Andreas Senft View Post
    I am not sure whether it is possible to dynamically create PDF documents.
    Of course that's possible Spring itself comes with an AbstractPdfView (which won't be usable here). And Cocoon offers a FOPSerializer since years.

    So it's more or less only a question of integration. But I would definitely not add it to the logging since it's a PDF rendering is really resource intensive process.

    Jörg

  4. #4
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    Quote Originally Posted by Jörg Heinicke View Post
    Of course that's possible Spring itself comes with an AbstractPdfView (which won't be usable here). And Cocoon offers a FOPSerializer since years.
    Hi Jörg,
    yes I have been aware of that, but I did express myself unclear. With "dynamically" I meant to dynamically append to an existing PDF document as required by logging. What I am not sure is, whether it would be as simple as just adding a line like in a text file.

    Quote Originally Posted by Jörg Heinicke View Post
    So it's more or less only a question of integration. But I would definitely not add it to the logging since it's a PDF rendering is really resource intensive process.
    Indeed. Irrespective of the fact how simple it might be, I also do not think that it would be a good idea.

    Regards,
    Andreas

  5. #5
    Join Date
    Nov 2005
    Location
    Reutlingen, Germany
    Posts
    2,098

    Default

    Quote Originally Posted by Andreas Senft View Post
    What I am not sure is, whether it would be as simple as just adding a line like in a text file.
    I think iText is quite good in this regard (modifying PDFs). We use it for splitting huge PDFs in multiple files and adding preview watermarks to preview versions. But since I did not implement it I can't tell so much about it.

    Jörg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •