Part of the issue is that in non guerrilla styled conflicts or in pure logistic roles, the use of canines in warfare in pitched battles, is usually a waste of resources. Namely, assuming you are faced in a pitched battle, in an era past around 4000 BCE, you will be facing armies wherein the majority of the enemies carry weapons of some kind and assuming nay sort of organization, are formed into lines of battle. When dogs are unleashed in a pitched battle, the general wisdom is that they generally do not have the same level of caution, pacing and dexterity of humans and will simply charge haphazardly and single out individual targets in the enemy lines. This is easily countered by humans with weapons simply fighting as a unit, even as individuals with weapons, the dogs often will not be able to get close to use their teeth or paws and will instead be smashed by something such as a club, spear, sword or mace. As well, the armor that many armors would field in the middle ages, would almost totally nullify dogs in a pitched battle scenario. A bite from a dog into most metals, we can expect to break its teeth and or jaw and cause the dog to more than likely flee in pain; it is akin to sending men to fight with only their fists and expecting them to punch armored targets. However, I can see dogs having uses (assuming fast, large sized dogs) against very lightly armored to no armor enemies. Say, a case wherein a large sophisticated civilization battles an enemy which in its army includes peoples whose style of war is traditionally fought naked or with armor equating to loincloths, animal fur draped around genitalia, etc... Say many of the armies from Mesoamerica, Sub-Saharan Africa, the southeast Asia, certain Celtic warriors, etc... these sorts of lightly armored warriors could be vulnerable to well placed hordes of dogs sent after them, as a sort of shock effect paired with an infantry charge of your own, the dogs play the role of bloodying the enemy and holding their attention briefly.
Otherwise, as mentioned earlier, dogs are valuable in hunting enemy positions with their scent, giving alarms in night engagements, attacks in the bushes and forests in guerrilla wars, etc... Another arena, could be in a scenario of raiding, looting, pillaging, certain armies use dogs to be an effective way of attacking lightly armored village levies and attacking single targets. Such as, a single horseman with considerable income, uses a pair of large dogs as pieces of his war chest along with weapons, horse etc, and when going into battle, these can attack an enemy he has singled out and allows him to give the killing blow with their distractions influencing the enemy.
An idea ^