Involving the authorities should be your last recourse for a barking dog, because it is likely to take a good bit of time and effort to secure an acceptable resolution, and is sure to make your relationship with your neighbor uncomfortable at best and quite possibly openly hostile. But, if you have exhausted other options and/or see no alternative, make sure you know your rights and how to assert them. Some municipalities have specific codes regarding barking dogs, while others include it within nuisance or noise ordinances. Within a single metropolitan area, local codes can vary widely, so contact your local government authority for clarification. If you and your neighbor are both part of a neighborhood association, there may be codes that cover barking dogs. Similarly, if you are renters (especially if you have the same landlord), look into the terms of your lease. Some municipalities may provide, or be able to refer you to, mediation services (binding or non-binding) to keep such disputes out of the courts. Contact your local government, district attorney's office, or small claims court to inquire. The days of the dog catcher coming around unannounced and snatching up problem dogs is over, but your local animal control service may be able to intervene for you. Contact the service to find out whether it handles nuisance barking, or whether you need to involve the police first. You may need to be persistent in your calls and/or be able to provide evidence that the dog is a nuisance for animal control to act. Call animal control right away if the dog is barking because it is in pain, has trapped itself in a small area, has tangled its chain, or is otherwise unable to access water. Contact the owner first if you are comfortable doing so, but don't ignore a suffering dog that is not receiving proper care. Involving the police will usually either immediately escalate or immediately resolve the situation. Your amount of preparation beforehand may well make the difference. Once you make yourself familiar with the relevant dog/noise/nuisance ordinance(s) in your area, call the non-emergency police number to report a violation. Unless your local police uses the emergency number (such as 911) for all calls, do not call it to make a barking dog complaint. It is conceivable that you may be cited for misuse of the emergency line. Many police departments and other services require you to prove that the barking is extreme before they can take action. Here is where your record-keeping log book, recordings, statements from other neighbors, etc. can prove invaluable in supporting your claim. Once the police are involved, your neighbor may feel besieged and try to frame the issue as a dispute between neighbors, in which you are primarily at fault for some reason. This is why it is essential to never give him ammunition to use against you by making threats, shouting, swearing, accosting the dog in any way, etc. If you need to go to court to prove a noise/nuisance violation, come prepared with the evidence you have gathered. Calmly and clearly establish your case. You may be able to sue your neighbor in small claims court for causing you loss of enjoyment of your home and property. You're not going to strike it rich this way (and may even end up losing money in the process), but if you provide a clear, strong case supported by documented evidence, you may be able to get your neighbor to finally quiet that dog. If you find that the local laws regarding nuisance dogs are lacking in your area, start a petition and contact your elected leaders.

Summary:
Familiarize yourself with local laws/codes. Call animal control. Call the police. Pursue legal action.