Announcement Announcement Module
Collapse
No announcement yet.
one simple question to ask Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    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.

    Comment


    • #3
      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

      Comment


      • #4
        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.

        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

        Comment


        • #5
          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

          Comment

          Working...
          X