Catching and logging ALL events

Hi,
I was wondering if anyone had some ideas on an optimal design pattern (or underlying Java core technology) for capturing ALL events generated by an application.
At present, I have a rather complex system that involves each specific class throwing events, and being caught by particular listeners. As the code grows, more and more events are being thrown and caught. I'm currently discrimenating between events with if-else blocks. This doesn't scale well at all.
I'd preferably like to have a design whereby any class can send an event, with a signature so that I can analyse the data afterwards (ie which class threw the event), with only one listener.
Observer pattern doesn't seem to be applicable here but ....
Thanks in advance for all your suggestions.

http://forum.java.sun.com/thread.jsp?forum=57&thread=308912

Similar Messages

  • I want to see events on my iphone calendar that I had from a year ago, but my events only go back 6 months even when I go into settings and put all events

    I want to see events that I had a year ago on my iphone calendar, but they only go back 6 months and if I go to settings and choose "all events" then nothing shows up as an event!!

    Are your contacts stored in an MS Exchange server, in iCloud, or some other source? Setting the Sync to less than All Events should not delete events, but only stop showing them on your device. However, Outlook also has a setting to actually delete events older than a certain date. Have you checked that?
    If you log in to iCloud.com (and you are syncing with iCloud) what do you see? Whatever is there is all you can get on the iPhone, unless you can restore from another source.
    I also suggest enabling iCloud Backup (settings/icloud - Storage and Backup). This will create a new backup any time your phone is connected to power and WiFi, so you will always have a current backup, painlessly.

  • SharePoint hosted App that listens and log SharePoint Events

    Basically, what I need, is something that can listen to all events fired in SharePoint and write them to a custom list.
    I was thinking of making this as a SharePoint hosted app because it has to work on SP Online as well.
    The idea is then, to let a provider hosted app read the custom list every x minutes and do it's own logic depending on the events it reads from the custom list.
    So the question is, how do I catch all the events fired in SharePoint and should it be a SharePoint hosted app that does it?
    Any thoughts on how to solve this?
    Thanks.
    Thomas Bomann, simplySo

    Hi,
    According to your description, my understanding is that you want to track all the event fired in SharePoint .
    Listen to the events in SharePoint needs Server side code, see the article below:
    Programming Event Handling in Windows SharePoint Services
    In SharePoint hosted app, it needs to use Client Object Model, so there is no such Client API to meet the requirement.
    More information:
    JavaScript Client Object Model in SharePoint 2013
    Thanks
    Best Regards,
    Jerry Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • NI USB CAN 8473 write single frame and log all frame of network with read notification on the same port

    Hello,
    I am trying to code an application which:
    - Write sometime (button click) a frame on a CAN network
    - Log all frame of CAN NETWORK
    My hardware is NI USB 8473 (1 port).
    1/ After reading NI help about CAN APIs, I think it is not possible to do "log all CAN frame" with Channel API because I need to install a asynchronous callback to read all message, and this functionality is only present in frame API.
    Anyone can confirm?
    2/ No problem let's use Frame API
    I have tried "CAN Receive with Notification" example delivered with NI-CAN driver, configured on virtual CAN256.
    I start other sample program to generate some frame on virtual CAN257, no problem, everything is working.
    So, i have tried to modify "CAN Receive with Notification" to add write function. I have mixed this source with "Transmit Receive same Port" sample (which works fine alone on CAN256).
    My program is running, but nothing appens when I click on WRITE button.
    I suppose some attribute are not confired, but which one.
    Anyone can help? (source of my modified sample is joined to this post).
    Thanx.
    PS: please note im a newbie with CAN
    Attachments:
    CAN Receive with Notification.zip ‏10 KB

    Hi,
    Thank you for posting your question on National Instruments' Forums.
    I'm a little puzzled by your question.
    If I understood well, you just want to receive every frame reaching the port and sometime write something through the port. Am I correct ?
    You are right when you state that the NI USB 8473 can only work with frame API. However, if the operation you want to make is the one I discribed above, I can't see where you encounter a difficulty.
    Indeed, for such a case, the example you mentionned in your post is perfectly suited. "Transmit Receive same Port" allows you to receive the frames reaching the port and write we needed too.
    I think this example shoudl do the trick.
    Or have you a more specific application in mind ?
    I hope this information will help you.
    Best regards,
    Guillaume H.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> NIDays 2011, le mardi 8 février au CNIT de Paris La Défense

  • Warning the operator and logging an event would be a reasonable altermative

    While it would be ideal to have the ASA "reprocess" the policy change and have it take effect immediately, for us it would be adequate for it to simply warn on the console and in the log that the "all URLs blocked" state was entered and that action is necessary to correct the condition.
    The primary issue at present is that the ASA remains silent, but shuts down the web-site.  This has caused some consternation.

    A MacBook Pro is a good choice for a number of reasons.
    Good solid professional machine.
    Able to run Windows if needed as well as the Mac OS, either natively through Boot Camp software or in a virtualized environment such as Parallels.
    Plenty of native software for almost any need.
    New revision just out, so you get all the latest stuff.
    A good idea would be to go to one of the Apple retail stores and try using the MacBook Pros they have on display. You'll find out if you really like it.
    If you have any specific software you need for your coursework, find out what it is and check to make sure it will run on the Mac. Very important!
    Best of luck.

  • Is there a way to delete all events with the same title (not added as reoccurring) without deleting one at a time?

    i currently have a calendar synced that has events scheduled in perpetuity, scheduled as individual events.  I would like to delete all events with the same title.  I do not want to delete the entire calendar nor do I want to go into every event and delete individually.  These were not scheduled by me so I do not know how they were added one by one and go on forever but they are NOT scheduled as reoccurring and thus must be modified individually.
    I can do a search and find all events, is there a way to just delete all events with the same title all at once?
    this is a Microsoft outlook synced calendar and I am seemingly unable to delete the events all at one time from Microsoft as well. 
    Please help!

    If you still have access to the Outlook calendar in Outlook, I would delete them from there. There are a number of ways to do that, but if you open the individual event in Outlook, does it show a repeating pattern? If not, then you may have to delete them individually, but that is not that difficult either. Go into the calendar and then change the view to a list view. From there you can sort the view according to subject. This should bring all of these same appointments together in the list and you can select the group in Outlook and delete them. Once you do that, you can change your view back and then sync the phone. That will remove the events from the phone.

  • How to delete all events from iCal?

    Is it possible to select and delete all events from iCal? Or is it simpler to delete the calendar itself? Thanks!

    Sorted now!
    To clarify for people like me: type "." in the search bar
    Then click on the first item in the results pane
    Go to the other end of the list, hold down shift, and click the LAST item
    They should all be highlighted now
    Then use Edit/Delete
    NB it may take a couple of mins (or ten!) for the items to disappear from your view, particularly if syncing with MobileMe.

  • Bug: Ovi Calendar and pre-1975 events

    I was quite puzzled to discover the hard way that OVI Calendar does not support events dated before 1/1/1975. Apparently not  all developers learned from the Y2K bug.
    Why do I need events in the past, you may ask. Well, to store birthdays/years.I have stored birthdays of my contacts as yearly repeated events in Outlook, starting from the day of birth. That's handy to remember their age. I first synchronised them with my phone (Nokia 5800) and everything went right. When I synchronised them with OVI, all events scheduled before 1975 got moved to December 2010 or January 2011 (day of month was preserved, though).
    This is a bug and users should be warned/informed.

    If I set MD-Soft Birthdays to create memo events rather than anniversary events for my contacts' birthdays, one-time-only memos are created for the current and next year and at least they are not moved to december.
    However, another strange behaviour/bug happens when syncing: the synced memo events appear in the online OVI calendar one day earlier, i.e. a memo scheduled in the device's calendar on 25 August (because that's the birthday date) will appear on OVI calendar on the 24 August. The memo is then not further synced with the calendar, i.e. if I delete the 25 Aug memo from the device's calendar, the corresponding (wrong) 24 Aug memo is not deleted from OVI and, vice versa, the 24 Aug memo is not synced back to device's calendar even if it appears in OVI.  Further, the wrong 24 Aug memo is then treated as an independent entry and synced back to the device.
    That's annoying, because besides not working, now I have to remove all those wrong events! Luckily, Birthdays allows to search and remove all events starting with '[B]' (not only those it created itself), which also takes care of the wrong memos that got synced back. Otherwise, since OVI Calendar does not allow to search for strings shorter than 4 characters [DOH!], I would have needed to delete them manually!

  • CSA MC Events Log and Agent Panel Events Corrolation

    I have recently install CSA MC 6.0.0.201 and the agent on a Win2003 server. I have a question of events showing up in the agent panel and not showing up in the MC events log.
    I see a number of events in the agent 'panel' event viewer. At the end of the event is a number in brackets like [176].
    When I look at the MC event viewer but those events are not being reported.
    My query is:
    #1 I believe the example [176} is the rule being triggered. So if the event is not showing up in the event viewer how to I find that rule in the policies? I finally did stumble across the rule and I see that logging is disabled for that rule, but finding that rule was a needle in the haystack search. Is there an easier way to find rules?
    #2 Maybe I do not understand this part but in the MC I placed this server (the one with the MC) into 'Audit Mode' in hopes that would get the events from the agent to show up in the MC event log. No good. Is there a way to get all events - even if the rule says to not log the event - so show up in the MC log so I can creat an exception?
    Thanks
    Larry

    Tom,
    I think I may have made some progress. Yes I'm in advanced mode. I went into Systems | Groups and first selected the 'Servers' and turned on logging. Still most the events in the agent event viewer were not making it to the MC event log.
    So I went back in to the Systems | Groups and found there was a group called 'Servers - CSA Management Center' and turned on logging there and that got the events to start flowing into the MC events.
    Maybe this will help me get going.
    Larry

  • [svn] 869: Bug: BLZ-92 - catch IOException and log at the info level to keep from polluting the logs

    Revision: 869
    Author: [email protected]
    Date: 2008-03-19 15:21:25 -0700 (Wed, 19 Mar 2008)
    Log Message:
    Bug: BLZ-92 - catch IOException and log at the info level to keep from polluting the logs
    QA: Yes
    Doc: No
    Details:
    Tomcat 5+ throws a ClientAbortException when it receives a TCP RST while writing a response to a client that has exited. This custom exception extends IOException, and we were only doing lighter INFO-level logging for SocketExceptions so the ClientAbortException was getting past this leading to ERROR level logging. This little tweak will mean less pollution of the server logs during QE load tests.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-92
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/endpoints/BaseHTTPEndpoint.ja va

    Hi AbhijitRoy2005,
    Other then climbing in the phone and calling the vendor, you could try:
    1. To use a BufferedInputStream to wrap the SocketInputStream before you wrap that in the DataInputStream. So basically:
    DataInputStream dis = new DataInputStream(new BufferedInputStream(socket.getInputStream());On one of my implementations this made a difference of a factor of 200+! So instead of processing 500 messages per second, I could process 10000 messages per second!
    2. Or to take it to the next level and take a look at using NIO. That is New IO, available since Merlin (Java 1.4). But that would take you way more time then the first attempt.
    The thing addressed by the possible solutions above is the blocking nature of the Stream based socket handling. Using a buffered input stream reads ahead. The NIO thing is all about non-blocking IO, which uses Channels and Buffers instead of Sockets and Streams (note that these are not equivalent!).
    Of course, if you didn't change something in your own code, it might just very well be that the vendor just screwed up his ;)
    Regards,
    Frens

  • How to save all event viewer log files in Windows 7 Professional

    Hello,
    I would like to save all Event Viewer logs from my Windows 7 Professional computer and be able to view them from another computer.  Currently I can only save one log at a time.  Please let me know how I can save all Event Viewer logs
    (Windows Logs, Applications and Service Logs, etc.).
    Thanks,
    Jason

    Hi Jason,
    There is no idea to save all categories log.
    It's recommend you ask in Official Scripting Guys forum for further help:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG
    Besides that, this thread could be referred:
    http://social.technet.microsoft.com/Forums/en-US/d66c1bd7-0e61-4839-a5f6-cbe29661dccb/how-to-use-script-saving-log-from-event-viewer-into-csv-file?forum=ITCG
    Karen Hu
    TechNet Community Support

  • Can I switch calendars (Ex. "night shift" to "day shift" cal) with a repeating event, but ONLY for that one event??  It asks "for all events or only this event" if i change the time.  But it changes ALL events when i try and switch calendars.  Any help??

    I have 2 calendars set up for my work schedule, a "night shift" and "day shift" calendar.  I've set up repeating events fro Fri/Sat/Sun 3-11pm "night shifts" and Mon/Tues 7am-3pm "day shifts".  But lets say for example that I swap shifts and instead of working nights on Saturday like I normally would, I am now working days.  I want to change that in my calendar.  When I go to change the event, if i change the TIME it asks if i want to change all event or ONLY this event.  no problem....just this single event.  but when i go to change the event from the "night shift" calendar to the "day shift" calendar, it changes ALL the repeating events, and not just that one single event.   can anyone help with this???  am i doing something wrong?  is there a way to do this or not with the new iCal program???  i used to do this and never had any problems.    Thank you!

    You need to follow iPhoto terms since we only know what you tell us
    what are you calling folders - in iPhoto folders can not hold photos - albums hold photos and folders hold albums or other folders
    The basic default view of photo is by event (iPhoto '08 and later)
    Exactly what you you trying to do?
    LN

  • Tried to sync my 5c on itunes but my daughter was logged in and now all her contacts, apps, and messages etc are on my phone. I was in the process of trying to run a backup because there was not enough memory for my phone to perform it. Help!!

    I was in the process of syncing my iphone 5c and then wanting to do a backup through iTunes because my phone did not have enough memory to backup. When I connected the phone to my computer and pulled up Itunes I thought I was logged into Itunes (my name was showing) but apparently my daughter had used and logged into itunes. Needless to say it started to sync and now my phone has all of her contacts, messages, apps etc. I followed what had been previously posted :
    This solved my question by Malignance on Feb 23, 2013 11:27 AM
    You should use separate Apple ID's for iCloud, iMessage and FaceTime. These services are separate from iTunes.
    Create a new Apple ID > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/ -- Note: You need a verified email address
    On one of the devices go:
    Settings > iCloud > (Scroll Down) Delete Account > Sign in with the new Apple ID -- Note: This only affects the device
    Settings > Messages > Send and Received > Apple ID > Sign Out > Sign in with the new Apple ID
    Settings > FaceTime > Apple ID > Sign Out > Sign in with the new Apple ID
    This will separate your iCloud content (i.e. Contacts, Notes, Reminders etc.), Messages and FaceTime.
    You both can continue to use the same Apple ID for iTunes and share purchased Apps, Music and Movies
    See the answer in context
    But I still have all her info on my phone. Is there any other way I can fix this or do I need to physically delete each contact, app, and message from my phone (and I still have not run a backup). Thanks for any help you can give me.

    If her data was not backed up or synced to something, it's gone. Sorry.

  • I purchased a used 2008 iMac. And although the previous owner said he deleted all of his information his iCloud account is still the primary. I don't have a clue about what to do about it. I signed him out and logged in with my info, but still no go.

    I purchased a used 2008 iMac. And although the previous owner said he deleted all of his information, his iCloud account is still the primary. I don't have a clue about what to do about it. I signed him out and logged in with my info, but still no go. Is there any way to eliminate his iCloud account and make mine the primary without rebooting it back to factory settings? There was an update, I believe, that I couldn't install because i didn't have his password that is what made me aware that his acct. was still active. I don't know what to do. Any help is greatly appreciated. Thank you.

    Before buying a second-hand computer, you should have run Apple Diagnostics or the Apple Hardware Test, whichever is applicable.
    The first thing to do after buying the computer is to erase the internal drive and install a clean copy of OS X. You—not the original owner—must do that. Changes made by Apple over the years have made this seemingly straightforward task very complex.
    How you go about it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    It's unsafe, and may be unlawful, to use a computer with software installed by a previous owner.
    1. If you don't own another Mac
    a. If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller—not from eBay or anything of the kind. If the machine is very old and has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    b. If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for a MacBook Air. You should have received the media from the original owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To start up from an optical disc or a flash drive, insert it, then restart the computer and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    c. If the machine shipped with OS X 10.7 or later, you don't need media. It should start up in Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    d. Some 2010-2011 models shipped with OS X 10.6 and received a firmware update after 10.7 was released, enabling them to use Internet Recovery. If you have one of those models, you can't reinstall 10.6 even from the original media, and Internet Recovery will not work either without the original owner's Apple ID. In that case, contact Apple Support, or take the machine to an Apple Store or another authorized service provider to have the OS installed.
    2. If you do own another Mac
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to prepare a USB device, then start up the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can start from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    3. Partition and install OS X
    a. If you see a lock screen when trying to start up from installation media or in Recovery mode, then a firmware password was set by the previous owner, or the machine was remotely locked via iCloud. You'll either have to contact the owner or take the machine to an Apple Store or another service provider to be unlocked. You may be asked for proof of ownership.
    b. Launch Disk Utility and select the icon of the internal drive—not any of the volume icons nested beneath it. In the  Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    c. An unusual problem may arise if all the following conditions apply:
              OS X 10.7 or later was installed by the previous owner
              The startup volume was encrypted with FileVault
              You're booted in Recovery mode (that is, not from a 10.6 installation disc)
    In that case, you won't be able to unlock the volume or partition the drive without the FileVault password. Ask for guidance or see this discussion.
    d. After partitioning, quit Disk Utility and run the OS X Installer. If you're installing a version of OS X acquired from the App Store, you will need the Apple ID and password that you used. When the installation is done, the system will automatically restart into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    e. Run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the original owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed—you have to repurchase them.
    4. Other issues
    a. If the original owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're irrevocably linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Mac App Store Customer Service has sometimes issued redemption codes for these apps to second owners who asked.
    b. If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.
    c. When trying to create a new iCloud account, you might get a failure message: "Account limit reached." Apple imposes a lifetime limit of three iCloud account setups per device. Erasing the device does not reset the limit. You can still use an iCloud account that was created on another device, but you won't be able to create a new one. Contact iCloud Support for more information. The setup limit doesn't apply to Apple ID accounts used for other services, such as the iTunes and Mac App Stores, or iMessage. You can create as many of those accounts as you like.

  • I updated my iPhone 4 to iOS5 and let it sync with my Macbook and now all my iPhone iCal entries are gone. How can I get my iCal events back on my iPhone?

    I updated my iPhone 4 to iOS5 and let it sync with my Macbook (running Lion) and now all my iPhone iCal entries are gone. How can I get my iCal events back on my iPhone?

    Me too!  Help anyone?

Maybe you are looking for