How much of logging is too much of logging?

Hi All,
OK, that was my question, how much of logging is too much of logging?
Recently one of my co-worker (not me, not me at all) had written about 100 classes and after getting the framework right, he has now been asked to log all those bunch of classes and methods.
He is damn bored and fed up with logging and he needs to log it in a ratio of 1 line of logging per 10 lines of code (approximately). And he also must log "ENTERING", "EXITING" in each method whenever he enters and exits a method.
I personally like to log as little as possible, although we don't log everything in INFO and we do log a lot of things in DEBUG logging level, logging every method doesn't feel correct to me.
And I hate too much of logging because to me it makes the code unreadable. Many of you will disagree this point, but I feel the important log statements often get messed up with those "ENTERING" and "EXITING" kind of log statements.
And another question, when is the right time to log? Logging as and when we are writing the code or logging it after everything is done (like how the pure dude is doing now). The former seems to be the better.
Your thoughts??
Thank you

Hi All,
OK, that was my question, how much of logging is too
much of logging?Too general for a one size fits all answer.
And he also must log
"ENTERING", "EXITING" in each method whenever he
enters and exits a method.Sounds fine, especially if it logs the parameters passed to the method, as well as what it returned (if not void) or if it returned via exception.
>
I personally like to log as little as possible,
although we don't log everything in INFO and we do
log a lot of things in DEBUG logging level, logging
every method doesn't feel correct to me.It's reasonable. During development, logging may be very verbose, but it can be useful. During production, you can configure the logging to not log at the DEBUG level, so you wouldn't see these log messages anyway and it shouldn't impact performance enough to be a concern.
And I hate too much of logging because to me it makes
the code unreadable. Many of you will disagree this
point, but I feel the important log statements often
get messed up with those "ENTERING" and "EXITING"
kind of log statements.This is a perfect fit for AOP (Aspect Oriented Programming). Rather than clutter the code with these log messages, these can be "woven" into the bytecode at compile-time or run-time.
Aspect-J is one popular AOP framework.
http://www.eclipse.org/aspectj/

Similar Messages

  • The old calender iOS6, in the year view, it shows how much busy I am in a day by indicating the color intensity. But the new calendar year view is totally useless!!! also too bright!! Why apple does this?? What is the way to revert the calendar back???

    The old calender iOS6, in the year view, it shows how much busy I am in a day by indicating the color intensity. But the new calendar year view is totally useless!!! also too bright!! Why apple does this?? What is the way to revert the calendar back???

    Unfortunately, that's the way the cookie crumbles nowadays. Sir Jony Ive's GUI design for iOS7 has been met with much skepticism (to say the least). But until the company sees the compelling need for an adjustment or reversal, it "ain't happenin' ". So amble over to the feedback page ( http://www.apple.com/feedback/ ) and make your displeasure known to the company, OR make it known by not purchasing its products. Because as long as the iGadgets continue selling as fast as they can make them, they will see no need for change.
    BTW, do note you are NOT talking to Apple here. This is just a user-to-user forum.
    Edit: for now, you can also try out any of the alternate calendaring apps available in the App Store.

  • How much RAM should I upgrade too?

    I recently purchased a 13" MacBook Pro. It is a mid-2012 model. It currently has 4 GB. I connect it to an external monitor which makes it easier for me to use while editing. I always have the application sit and load with the spinning ball icon. I use FCPX, Photoshop, and After Effects on a daily basis. I was wondering if the RAM increase would help me create my videos more efficently. Thanks for all the comments and help ahead of time!

    You should benefit from adding more RAM. How much is hard to say but at least to 8 GBs. You might know more if you observed your memory usage in Activity Monitor.
    About OS X Memory Management and Usage
    Using Activity Monitor to read System Memory & determine how much RAM is used
    Memory Management in Mac OS X
    Performance Guidelines- Memory Management in Mac OS X
    A detailed look at memory usage in OS X
    Understanding top output in the Terminal
    The amount of available RAM for applications is the sum of Free RAM and Inactive RAM. This will change as applications are opened and closed or change from active to inactive status. The Swap figure represents an estimate of the total amount of swap space required for VM if used, but does not necessarily indicate the actual size of the existing swap file. If you are really in need of more RAM that would be indicated by how frequently the system uses VM. If you open the Terminal and run the top command at the prompt you will find information reported on Pageins () and Pageouts (). Pageouts () is the important figure. If the value in the parentheses is 0 (zero) then OS X is not making instantaneous use of VM which means you have adequate physical RAM for the system with the applications you have loaded. If the figure in parentheses is running positive and your hard drive is constantly being used (thrashing) then you need more physical RAM.
    Adding RAM only makes it possible to run more programs concurrently.  It doesn't speed up the computer nor make games run faster.  What it can do is prevent the system from having to use disk-based VM when it runs out of RAM because you are trying to run too many applications concurrently or using applications that are extremely RAM dependent.  It will improve the performance of applications that run mostly in RAM or when loading programs.

  • How Much is Too Much?

    Hi everyone,
    I have recently been using my macpro more and more for high-def video work. I usually leave it on 24 hours a day as at night I set up a batch of files in compressor to run over night. Essentially, all my CPUs are maxed almost all the time. I am wondering if this could become a problem? I have read a little about average loads but don't fully understand what they mean. Mine are: 8.60, 7.58 and 7.42 and I am getting pretty high temps on my CPUs, power supplies and hard drives (about 44C, 54C and 39C average respectively). Am I pushing this thing too hard? How much is too much? Please see my system specs below.
    Thanks a lot!
    ~ Philip

    Don't let the drives get to 70C! they can take 50C safely. Memory and graphics are more of a concern. The cpu will protect itself.
    smcFanControl can insure that your fans stay above the default minimums, which is worth taking a look at (freeware).
    Fluctuation in temps between extremes can stress a hard drive and memory.

  • How much cd burning is too much?

    Can too much burning damage my computer?

    No ... although your Mac is not a professional disk duplicator, so if you do a lot of high-quantity burning you may put more wear and tear on the drive mechanism than you would normally, but most reasonable disk burning falls within the drive's tolerances. How much are you doing?
    Matt

  • How much is too much music on itunes?

    im uploading a lot of music onto my itunes, for two different ipods, and i dont know if i put too much music on if there will be a lag or anything
    can someone please tell me how much music a computer can take before significantly slowing down?

    As long as there's at least 1GB of space free on the hard disk at all times and the iTunes library isn't stored on the Finder's desktop, you shouldn't experience a major slowdown regardless of how big the iTunes library gets.
    (19551)

  • I'm on a prepaid plan for the 4s, i want the hotspot option which isn't offered on the prepaid plan.  heard the connection is too slow on the 4s only worth it on the 5 or 5s. would you agree? not sure how much the hotspot would increase my monthly bill...

    i'm on a prepaid plan for the 4s, i want the hotspot option which isn't offered on the prepaid plan.  heard the connection is too slow on the 4s only worth it on the 5 or 5s. would you agree? not sure how much the hotspot would increase my monthly bill....

    To use the hotspot for any of those devices, I believe you have to switch to a postpaid account and plan. You can see the pricing for the available postpaid plans under the "Shop" area of the website.

  • How much can too many imports slow inititialization down?

    How much can too many imports slow applet inititialization down?
    I have seen our company's sorce code for some huge applets they have written. In many, many cases, the imports at the beginning of each file are written something like this...
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.border.*; 
    import javax.swing.event.*;Only certain portion of these imports are actually used. Does this sort of thing really impact the applets loading speed? I know it will obviously take at least a little longer but will the user even notice?

    You are not actually importing the classes, but rather making the names of the classes available.

  • Too High Bit rate error no matter how much reduce it

    After Exporting an HDV 1080i 16:9 3 sequences from FCP via
    compressor at Best SD DVD 90 minutes, 16:9, and burning two DVD-Rs that work, now DVDSP keeps giving me Video Bit Rate too high error and stops building shortly after starts. And no matter how much I lower bit rate won't do it! HELP

    I think - and see if you agree - that I exported using a compressor bit rate setting of 6.0 and max of 7.5 on the first 56 min sucessful sequence build/burn, and then thought I could go higher on the second export so goosed the max bit rate to 9.0 since there were occassional big bits of motion. So now on the other two sequences DVD SP won't adjust that previous compression rate, and instead I will have to sacrifice the audio quality (use Dolby only)
    to get it to build. I certainly DON't want to wait 26 to 28 hours again for each sequence to export!! Does that sound right?

  • Apps are using too much memory. how do i find out how much each app is using?

    MACAir Memory 128gb: the apps are using too much memory. i get not sufficient memory for upgrades. how can i find out how much memory each app is using?

    Mavericks is designed to use RAM differently for good reason. Normal
    http://appleinsider.com/articles/13/06/12/compressed-memory-in-os-x-109-maverick s-aims-to-free-ram-extend-battery-life
    Mavericks uses RAM much more efficiently than any other previous version of OS X. Mavericks now has a memory compression feature that will compress the memory occupied by applications that aren't being actively used and give the freed up RAM to the application that needs it the most.
    Memory Pressure graph that tells you how stressed is the system in terms of memory.
    Fore more information about OS X Mavericks new system management technologies visit:
    http://www.apple.com/osx/advanced-technologies/
    See page 5 here:
    http://images.apple.com/media/us/osx/2013/docs/OSX_Mavericks_Core_Technology_Ove rview.pdf

  • How much Redo log is being generated by a user sesssion?

    How can find which user session is creating the highest redolog entries and how much rego log is being generated?

    1) Query V$SESS_IO. This view contains the column BLOCK_CHANGES which indicates how much blocks have been changed by the session. High values indicate a session generating lots of redo.
    The query you can use is:
    SQL> SELECT s.sid, s.serial#, s.username, s.program,
    2 i.block_changes
    3 FROM v$session s, v$sess_io i
    4 WHERE s.sid = i.sid
    5 ORDER BY 5 desc, 1, 2, 3, 4;
    Run the query multiple times and examine the delta between each occurrence of BLOCK_CHANGES. Large deltas indicate high redo generation by the session.
    2) Query V$TRANSACTION. This view contains information about the amount of undo blocks and undo records accessed by the transaction (as found in the USED_UBLK and USED_UREC columns).
    The query you can use is:
    SQL> SELECT s.sid, s.serial#, s.username, s.program,
    2 t.used_ublk, t.used_urec
    3 FROM v$session s, v$transaction t
    4 WHERE s.taddr = t.addr
    5 ORDER BY 5 desc, 6 desc, 1, 2, 3, 4;
    Run the query multiple times and examine the delta between each occurrence of USED_UBLK and USED_UREC. Large deltas indicate high redo generation by the session.
    You use the first query when you need to check for programs generating lots of redo when these programs activate more than one transaction. The latter query can be used to find out which particular transactions are generating redo.

  • HT1414 what if my iphone cannot be open itself when restoration is going on. apple log only appears and then it will return to restore mode? they told me that their is a problem on my power IC? if ever where should i go for repair? and how much it will co

    my iphone cannot open itself. they told that their is a problem on my power IC. where can i go to repair and replace the parts and how much it will coast? please help me. im in the philippines

    If the device is still under warranty, take it back to Apple or whomever provides support in your country.
    If it's not under warranty, take it wherever you like.  Apple does not sell parts nor do they repair devices.  They will offer an out of warranty replacement which is a complete, refurbished iPhone for the Out of Warranty replacement cost.

  • I have an iMac 5,1 with an Intel Core 2 Duo. I'd like to be able to use iCloud, but need Lion which is too big. How much memory can I add? And will this upgrade allow me to install Lion?

    I have an iMac 5,1 with an Intel Core 2 Duo. I'd like to Lion, in order to use iCloud, but the specs indicate I don't have enough memory. How much memory can I add? And will this upgrade allow me to install Lion?

    I believe your model iMac can address 3 GB RAM; the minimum for Lion is 2 GB - however, that is an absolute minimum for very light use. You would be much happier with a minimum of 4 GB.
    http://www.everymac.com/systems/apple/imac/stats/imac-core-2-duo-2.16-20-inch-sp ecs.html
    (You can install 4 GB, but it will only be able to address about 3.1 - 3.2 GB)

  • How much too launch an app?

    I'm creating an app for the IPHONE and I would like to know how much is it to have the app in the APP store
    can you help me ?
    Thanks

    If you have everything else, the cost to sign up is USD $99.00.
    See
    Choosing an iOS Developer Program / Which Developer Program is for you?

  • How much is the insurance too replace ipad if breaks

    Can anybody please tell me how much the insurance for an ipad is so if it breaks the insurance can give u a new 1

    Deductibles:
    Basic phone: $45
    Smartphone: $99
    iPhone (8GB or 16GB): $169
    iPhone (32GB+): $199
    Tablets: $149

Maybe you are looking for